Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDinesh Murugan
146 PointsWith the same program, I am getting the groceries listed but without an index(Numbers)
groceries = ['roast beef', 'cucumbers', 'lettuce', 'peanut butter', 'bread', 'dog food']
for index, item in enumerate(groceries): print(f'{index}. {item}')
(This the program I wrote )
1 Answer
Josh Keenan
20,315 PointsI am unable to replicate your error, as long as your print statement is within the for loop as I did have to move that into it.