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 trialEmilio Andere
495 Pointswhy is this code incorrect
why
def loopy(items):
for stuff in items
print(stuff)
1 Answer
Steven Parker
231,269 PointsThe challenge instructions said, "Reminder: Check your syntax and indenting!". Code that is inside a loop must be indented more than the loop itself. Your print statement is not part of the loop or the function.
Also, for proper syntax the loop line needs a colon (":") at the end.