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 trialbrent westley
1,089 Pointsi need help
i cant figure out what im doing wrong
def loopy(items):
# Code goes here
for item in items:
if item == "a":
continue
else:
print(item)
2 Answers
Neil Anuskiewicz
11,007 PointsI'm not experienced enough with Python at this point but I'd still like to attempt to help. Are you saying you're having trouble with Python's indentation rules? I just want to make sure that's really what you're after.
Steven Parker
231,248 PointsCheck your indentation
An else should always line up with the corresponding if.
Also, you don't want to compare the entire item with "a", just the first character (at index 0).
Neil Anuskiewicz
11,007 PointsYes, Python's strict indentation rules take some getting used to by I kind of like them. I figure once I have the drill down on that, I won't have to think about it.
brent westley
1,089 Pointsi tried using len that didnt help