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 Python Collections (2016, retired 2019) Tuples Combo

Combo Challenge

I do not know how this challenge works at all. Can anyone help?

combo.py
# combo([1, 2, 3], 'abc')
# Output:
# [(1, 'a'), (2, 'b'), (3, 'c')]
def combo(first_iterable, second_iterable):

1 Answer

Oszkár Fehér
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Oszkár Fehér
Treehouse Project Reviewer

Hi Dustin. Please give it a try first and after post your code and from there we can help you out. We could write to you the code but like that we don't help you to learn, just to pass the quiz. Give it a try, whatever you can write. If you are still stucked, give me a feedback and we continue from there. Happy coding.

I have a question. When I was looking through the community posts, many made a variable and set it equal to 0 and then made a for loop where they then made the variable +=1, why is that so?

Chris Freeman
Chris Freeman
Treehouse Moderator 68,166 Points

Dustin Jasmin, what you describe is creating a loop counter that is incremented during each iteration of the loop.