I am experiencing unwanted behavior with my code's if statements. When I call conditional statements inside the while loop, only the first condition is called no matter which input is supplied. I wish for the proper input to call the properly described function and then continue back to the beginning of the loop to ask the user for another choice.
color_modes = ['sangria', 'ham', 'nightHawk']
print color_modes
def sangria():
my_range = list(range(20))
print my_range
def ham():
print 'foo'
def nightHawk():
print 'nightHawk'
while True:
user_input = input('...')
if 'sangria':
ham()
continue
if 'ham':
sangria()
continue
if 'nightHawk':
nightHawk()
continue
else:
break
Moreoever, when I use the syntax:
if user_input == 'ham': instead of the shorthand if 'ham:, the condition does not function. Thank you in advance.