Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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.

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

3 Answers

Steven Parker
Steven Parker
217,570 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
217,570 Points

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

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