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.
checked independently, but not working here
I am getting errors on this. Don't know why. Compiles independently
# combo([1, 2, 3], 'abc') # Output: # [(1, 'a'), (2, 'b'), (3, 'c')] my_tuple =  a = [1,2,3] b = ('abc') def combo(*args): for i in range(len(a)): c= (a[i], b[i]) my_tuple.append(c) return my_tuple combo(a,b)
Steven Parker220,513 Points
The challenge tests your work using arguments that are not the same as the examples!
So when constructing the solution:
- don't use any fixed values, work only with the supplied arguments
- all code should be part of (inside) the function
- you only need to define the function, not call it
Ok, I just set everything within the function. But still not working.
def combo(): a = [1,2,3] b = ('abc') my_tuple =  for i in range(len(a)): c = (a[i], b[i]) my_tuple.append(c) return my_tuple </p>``` "don't use any fixed values, work only with the supplied arguments" what are the supplied arguments then? This specificities of how the compiler operates and what exactly is expected is really horribly explained.
def combo(a,b): my_tuple =  for i in range(len(a)): c = (a[i], b[i]) my_tuple.append(c) return my_tuple
This is the state of it now. The html tag was me being clever and trying to follow the markdown cheatsheet guidelines. Really, shouldn't *args be sufficient as the argument?
I work in anaconda, with spider. Formatting is good. the tag was done when positing to you here. This is still not working! error given is "Bummer, try again" Honestly, what kind of error is that? It speaks nothing to the problem. This is really becoming asinine.
def combo(a,b): my_tuple =  for i in range(len(a)): c = (a[i], b[i]) my_tuple.append(c) return my_tuple </p>
ok thanks, but obviously there is a bug in the system. Is there somebody who can update my profile then?