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

Jekabs Dambergs
Jekabs Dambergs
7,417 Points

I cannot finish and understand task 2, with creating the item3.

Some versions when I try, the system breaks down.

creating_tuples.py
my_tuple = ('I', 'love', 'python')

item3 = (my_tuple, 2)

3 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

Hi there, Jekabs Dambergs ! Remember, that you can access an item in a tuple just like you access an item in a list by using the index.

So if my tuple were:

whatever = ('My', 'name', 'is', 'Jennifer')

Then I could make a variable and assign "Jennifer" to it like this:

my_name = whatever[3]

Hope this helps! :sparkles:

Jekabs Dambergs
Jekabs Dambergs
7,417 Points

I keep getting this message: "Oh no! We didn't hear from the challenge service in a timely fashion.

If you continue experiencing problems, please contact support at help@teamtreehouse.com.

Fear not! Your code is safe with us. You will be able to resubmit once you reload the challenge."

Jekabs Dambergs
Jekabs Dambergs
7,417 Points

Thanks, problem resolved after several tries.