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 trialBobur Azimov
2,547 PointsTabError: "groceries.py", line 6 index+=1 for some reason i cant make it
i have an error on python example. groceries .py
groceries = ['roast beef', 'cucumbers', 'lettuce', 'peanut butter', 'bread', 'dog food']
index = 1 for item in groceries: print(f'{index}. {item}') 6.line index+=1
Steven Parker
231,275 PointsWe can't check the indentation unless you use Markdown formatting to preserve the code appearance.
Valentin Fezza
18,178 PointsWhat's that 6.line doing there?
1 Answer
Valentin Fezza
18,178 PointsThere's a piece of code ("6.line") in the middle of your print function that seems out of place...
Federico Lemaire
8,423 PointsFederico Lemaire
8,423 PointsMaybe this might help. Check the tabulation in your code
https://stackoverflow.com/questions/46742998/taberror-in-python-3-function?rq=1