0
listA = ['one', 'two', 'three']

phrase = input('> ').lower()

if phrase == str(listA[0]):
   #do something
elif phrase == str(listA[1]):
   #do something
elif phrase == str(listA[2]):
   #do something

I'm not sure why after I input 'one', I get the following error "name 'one' is not defined".

Still learning and googling, any help is much appreciated

Thanks

ForceBru
  • 43,482
  • 10
  • 63
  • 98
dili da
  • 1
  • 2

0 Answers0