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 trialAshley Keeling
11,476 PointsI don't know what I need to do next
I don't know how you put a letter together with a number (1,"A")
# combo([1, 2, 3], 'abc')
# Output:
# [(1, 'a'), (2, 'b'), (3, 'c')]
def combo(st,i):
i1=i.split()
st1=st.split()
return(st1,i1)
Steven Parker
231,269 PointsBut "zip" doesn't produce a list. However, you could convert it into one:
return list(zip(st, i))
But you still can't pass the challenge with that. It will say "Bummer! Don't use zip()
! I know it exists but the point of this challenge is to solve the problem yourself."
Myers Carpenter
6,421 PointsMyers Carpenter
6,421 PointsThere are a bunch of ways to do this
1) loop over a range
2) loop over enumerate
3) or zip (which we are actually rewriting for this challenge)
return zip(st, i)
I would take a moment and read the python docs for those three options. They will all be useful for you in the future.