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

traolach trewhella
PLUS
traolach trewhella
Courses Plus Student 835 Points

need a little help for theas 2 questions don.t understand were to put the t and trying my best thanks so much!!!!!

just need some help this seems simple i just dont know were to put the code please help(:

index.py
var1 = index{5}

1 Answer

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 Points

Hey there,

The challenge wants either a list or a string where the letter 't' will be at the 5th index spot (or the 6th spot in). Because index numbering starts at 0, it is the 6th one.

Off the top of my head, I couldn't think of a string where the 6th letter was 't', so I opted for a list.

var1 = ["a", "b", "c", "r", "s", "t"]

Hope this makes sense. Keep Coding! :dizzy: