15/19 Counting as you go


#1

choices = ['pizza', 'pasta', 'salad', 'nachos']

print 'Your choices are:'
for index, item in enumerate(choices):
index = choices
item = choices +1
print item

So there's my code, I don't get what's wrong with it. How do I enumerate this thingie?


#2

@kkang2097,

choices = ['pizza', 'pasta', 'salad', 'nachos']

print 'Your choices are:'
for index, item in enumerate(choices):
   print "{0} ==> {1}".format(index,item)
   print "[{theIndex}] ==> [{theItem}]".format(theIndex=index,theItem=item)

#3

nope its wrong. why the arrows? and it seems like unnecessary fluff


#5

choices = ['pizza', 'pasta', 'salad', 'nachos']

print 'Your choices are:'
for index, item in enumerate(choices):
index += 1
print index, item