When creating a for loop, it appears that python adds spaces.
menuItems = ['apple', 'banana', 'car', 'thing', 'whatever', 'burrito']
menuNum = 1
for menuItem in menuItems:
print menuNum,'. ',menuItem
menuNum = menuNum + 1
returns this
1 . apple
2 . banana
3 . car
etc...
Any idea on how I can simply get this without the spacing?
eg.
1. apple
2. banana
3. car
forloop aside from yourprintstatement being inside one? In other words, why do you think this problem is being caused byfor?