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 trialNathan Howard
Python Web Development Techdegree Student 2,351 PointsPython Basics Code Challenge
Let's practice with indexes! Make a new variable named var1 that is either a list or a string. Make sure that var1[5], the item with an index value of 5, is the letter "t".
7 Answers
Sandeep Krishnan
9,730 Pointswhat's wrong with varl = "abcdet" This also a string
Jeffery Austin
8,128 PointsNothing wrong with that. You can use a string or a list. All that matters is that "t" is at the index of 5.
Jeffery Austin
8,128 PointsWhat you want to do is create a string or list that has 't' at the index of 5. Remember that all indexes start at 0.
Nathan Howard
Python Web Development Techdegree Student 2,351 PointsThanks Jeff. I thought it was the letter 'l' LOL
Jeffery Austin
8,128 PointsNo worries, it actually does look like the letter 'l'. It's hard to tell.
Nathan Howard
Python Web Development Techdegree Student 2,351 PointsThanks Jeffery. Here's my code. I'm getting a syntax error
varl = ["a", "b", "c", "d", "e", "t"] varl = [ 0 1 2 3 4 5 ]
Jeffery Austin
8,128 PointsYou had it right, just missed the naming of the variable, you need var1, like var and the number one '1'
var1 = ["a", "b", "c", "d", "e", "t"]
Cosmas Gwenhamo
5,522 PointsStraight to the point Thank you so much
Aurelie Sacoman
723 PointsNathan Williams Jeffrey Austin Same mistake as you! I thought it was the letter "l" ! Working now, thanks guys!
Godfrey Chamunorwa
5,505 PointsGodfrey Chamunorwa
5,505 Pointsvar_one = ["a","b","c","d","e","t"]