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 trialSteven Gutierrez
Full Stack JavaScript Techdegree Student 9,035 PointsIndex Issue
I think my issue is how index 0 is written. Am I right?
def loopy(items):
for item in (items):
if item(0) == "a"
contine
print(item)
1 Answer
Jeffrey James
2,636 Pointsyeah 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
>>>
Steven Gutierrez
Full Stack JavaScript Techdegree Student 9,035 PointsSteven Gutierrez
Full Stack JavaScript Techdegree Student 9,035 PointsWow how did I miss that. I also spelled "continue", but it's still not giving it to me. What am I don't wrong?