Ask Anything Monday - Weekly Thread

Hey Guys. Posting this to try to get some opinions on it. What can be done better? What can make it simpler? This was my first foray into API's and Python coding in general. All it requires is a The Movie DB API Key which is free for to get on their site. Just plug the API key into the spot where it says "PUT API KEY HERE"

Let me know what you guys think. Thanks!

import json, pprint, requests
print('***Search for movie recommendations***')
print('Enter movie name: ')
userInput = input().upper()
ui = userInput.split()
ui = '+'.join(ui)
print()

movieSearch = 'https://api.themoviedb.org/3/search/movie?api_key=PUT API KEY HERE&query=%s&page=1' % ui
msresponse = requests.get(movieSearch)
msresponse.raise_for_status()
movieID = json.loads(msresponse.text)
mi = movieID['results']

for i in range(0, len(mi)):
    print('#', i, ' - ', (mi[i]['title']), ' (', (mi[i]['release_date'][0:4]), ')', sep='')

print()

print('Enter number that corresponds with movie you are looking for:')
option = int(input())

recommendations = 'https://api.themoviedb.org/3/movie/%s/recommendations?api_key=PUT API KEY HERE&language=en-US&page=1' % mi[option]['id']
response = requests.get(recommendations)
response.raise_for_status()
movieRec = json.loads(response.text)
md = movieRec['results']

print()

print('Recommendations for %s (%s) (results from TMDb):\n' % (mi[option]['title'], mi[option]['release_date'][0:4]))
for i in range(0, len(md)):
    print((md[i]['title']), ' (', (md[i]['release_date'][0:4]), ')', sep='')

print()
print('Press enter to Exit')
input()
/r/learnpython Thread