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) Python Data Types Specific Index value

Name:GoogleSearch orJonathan Sum
Name:GoogleSearch orJonathan Sum
5,039 Points

Let's practice with indexes! Make a new variable named var1 that is either a list or a string. Make sure that var1[5],

Make a new variable named var1 that is either a list or a string. Make sure that var1[5], My code is: varl='invent' varl[5] the code above works in my python shell. i don't know why it doesn't work in treehouse. It said 'varl' is not defined.

index.py
varl='invent'
varl[5]

2 Answers

Steven Parker
Steven Parker
231,248 Points

:point_right: The challenge asks you to make a variable named "var1" (v-a-r-one).

It looks like you created a variable named "varl" (v-a-r-lowercase "L")

Quinn Thompson
Quinn Thompson
1,227 Points

lol.. perhaps the name of this variable needs changing because I made this exact mistake too >.>