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

Question down below

Great! One more thing to practice. Make a new variable, var2, with "e" at index -2. Remember, negative indexes start at the right side of the iterable.

index.py
var1 = [1, 2, 3, 4, 5, 't']
var2 = "bambez'

2 Answers

Ronald Tse
Ronald Tse
5,798 Points

CHECK YOUR CODE CAREFULLY

use either "double" or 'single' for string but not mix them

var = "bambez"

what do you mean?

Ronald Tse
Ronald Tse
5,798 Points

can you notice the difference between

var2 = "bambez'
var2 = "bambez"