Assume the names variable references a list of strings. Write code that determines whether 'Ruby' is in the names list. If it is, display the message 'Hello Ruby'. Otherwise, display the message 'No Ruby'. starting out with python

Respuesta :

names = []

if "Ruby" in names:

   print("Hello Ruby")

else:

   print("No Ruby")

Just populate the names variable with whatever strings you want.