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

I'm stuck here

Create a variable called item3 and assign to it the third element in my_tuple.

creating_tuples.py
my_tuple = ('I','love','python',)
item3= (my_tuple[2],)

3 Answers

Steven Parker
Steven Parker
231,275 Points

You're referencing the third element, but you're enclosing it in another tuple. The challenge expects to see just the third element in the new variable.

As a newb, it "feels" intuitively incorrect as it is worded. In English, grammatically, the instructions seem unclear. The instructions seem to read as follows 1. Create a variable Item3 ( incorrectly inferred by me to name it 'whatever' ). 2. Then "assign" it to the third element in my_tuple. The confusion is at the operative word "assign". Apologies, but was that covered in proper context in the lessons? Thank you kindly for reviewing my post!

Steven Parker
Steven Parker
231,275 Points

The assignment is handled by the "=" operator. But the issue here is what is being assigned.

Eldin Guzin
Eldin Guzin
6,010 Points

you created a tuple with (my_tuple[2],) but that's not what you're suppose to do,it is asking you to assign the third element of the tuple you made(you did everything right just remove the brackets and the comma in line 2)

Ok great! Thank you Steve Parker