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 Continue

Index Issue

I think my issue is how index 0 is written. Am I right?

breaks.py
def loopy(items):
    for item in (items):
        if item(0) == "a"
        contine

        print(item)

1 Answer

yeah indexing uses square brackets

>>> data = [1,2,3]
>>> data[0]
1
>>> data(0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'list' object is not callable
>>> 

Wow how did I miss that. I also spelled "continue", but it's still not giving it to me. What am I don't wrong?