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 Python Collections (Retired) Tuples Combo

Not seeing where I tripped up here.

I am seeing an issue here where it's asking where combo() is, I defined it clearly on the first line of my code.

zippy.py
# combo([1, 2, 3], 'abc')
# Output:
# [(1, 'a'), (2, 'b'), (3, 'c')]
# If you use .append(), you'll want to pass it a tuple of new values.
def combo(iterable1, iterable2):
    tuple_lst = []
    for item in iterable1:
        tuple_lst.append((iterable1[count], iterable2[count]))
        count += 1

    return tuple_lst

1 Answer

Ryan S
Ryan S
27,276 Points

Hi Joeseph,

Yeah it is a strange error response and doesn't really help pinpoint the issue. But the problem is that you haven't defined the "count" variable before using it in your for loop. So you are trying to append a list using a variable that doesn't exist yet. If you fix that then it should pass.

Good luck.