This code works fine but I'm trying to understand "index" in the code below.
Is index pre defined? How does the interpreter know to print the index for each item in choices? In other words how does the interpreter know what we mean by "index"?
choices = ['pizza', 'pasta', 'salad', 'nachos'] print 'Your choices are:' for index, item in enumerate(choices): print index + 1, item