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 Introducing Tuples Getting to Know Tuples Creating Tuples

why is the prompt asking to create a new variable and assign it to the third element of the tuple? The tuple's immutable

Is this a typo?

create_tuple.py
# insert your code here

my_tuple = ('I', 'love', 'python')

1 Answer

Rachel Johnson
STAFF
Rachel Johnson
Treehouse Teacher

Hey yakky !

You are correct! Tuples are immutable. By definition: "A tuple is a collection which is ordered and unchangeable". It's unchangeable, but you can still grab the value at certain indexes because a tuple is ordered

For this challenge, we just have to grab the value at the 2nd index (since indexes start at 0)

item3 = my_tuple[2]

I hope this helps!