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 trialeynuax
779 Pointsnot sure how to index a character in a string that is a member of a list
help on this one...can't get my head around the example in the question...
def loopy(items):
for thing in items:
if thing[0] == "a"
continue
else:
print(thing)
1 Answer
jonlunsford
15,480 Pointseynuax:
I ran the challenge with your code and get "Bummer!". But, if I run it in a local Python shell it works. Not sure why, but it sounds like there may an issue with what the example is asking. I apologize for not being much help, but for what it's worth your code works and produces the example provided.
eynuax
779 Pointseynuax
779 Pointswah wah wah I forgot a ':' after if thing[0] == "a"
thanks for taking a look jonlunsford!