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 trial

Python Python Basics (2015) Shopping List App Break

Peter Braswell
PLUS
Peter Braswell
Courses Plus Student 1,507 Points

Probably missing something obvious on the challenge, but ...

I've tried running this code in a workspace and it works just fine. Am I missing something in terms of the set-up or completion requirement?

breaks.py
def loopy(items):
    for item in items:
        print item

2 Answers

Stuart Wright
Stuart Wright
41,118 Points

print() is a function so the parameters passed to it (item in this case) should be in parentheses:

def loopy(items):
    for item in items:
        print(item)
Peter Braswell
PLUS
Peter Braswell
Courses Plus Student 1,507 Points

Dang! I feel dumb! :)

Yep, that was it! Too much Ruby programming!

Nicholas Grenwalt
Nicholas Grenwalt
46,626 Points

Don't feel dumb. I once misspelled a word in a project and overlooked the misspelling for like hours thinking it had to be a something more complicated. ;) Coding has a way of humbling us all. Just keep at it.

Greg Kaleka
Greg Kaleka
39,021 Points

Another reason not to feel dumb: that's actually the way print works in python 2. Treehouse used Python 3, which now uses print as a function.