How to continuously prompt for user input?

Solution 1:

I would do it with a while loop. Like This:

while True:
    com = raw_input('Command:').split()
    if len(com) == 0:
        break
    elif com[0] == 'i':
        bike_name =  command[1] + ' ' + command[2]
        return get_product_id(products, bike_name)

Solution 2:

You've done most of the work, you just need this:

while True:
    print interact()