Complete the following print and if statements by accessing the appropriate elements from my_list. Hint: Use the list indexing notation []. print('My favorite color is', ???) print('I have {} pet(s).'.format(???)) if ???: print("I have previous programming experience") else: print("I do not have previous programming experience")
my_list = ['black',5,'Python']
print("My favorite color is "+my_list[0])
print('I have {} pet(s).'.format(my_list[1]))
if 'Python' in my_list:
print("I have previous programming experience")
else:
print("I do not have previous programming experience")
Comments
Leave a comment