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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Brian Minkin](https://secure.gravatar.com/avatar/40d50e241fae9fbf3034b8edfcf3cbef?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Brian Minkin
Courses Plus Student 795 Pointschecked 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)
6 Answers
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsThe 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
![Brian Minkin](https://secure.gravatar.com/avatar/40d50e241fae9fbf3034b8edfcf3cbef?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Brian Minkin
Courses Plus Student 795 PointsOk, 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.
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsThe supplied arguments are the ones you were calling "*args
" in your original definition. You can bet that when the challenge tests your function, the arguments it will give it will not be [1, 2, 3]
and 'abc'
.
The instructions say the function "takes two ordered iterables". Perhaps you would call them "a" and "b"?
![Brian Minkin](https://secure.gravatar.com/avatar/40d50e241fae9fbf3034b8edfcf3cbef?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Brian Minkin
Courses Plus Student 795 Pointsso changed to
def combo(a,b):
only error is "bummer: try again." No specifics. This is really unnecessarily mystifying.
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsWhen you added the parameters, did you also remove the assignments of the fixed values?
Also, does that stray HTML tag actually appear on the bottom line?
![Brian Minkin](https://secure.gravatar.com/avatar/40d50e241fae9fbf3034b8edfcf3cbef?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Brian Minkin
Courses Plus Student 795 Pointsdef 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?
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsSo does it pass now?
And your formatting was good other than that HTML tag. Perhaps you were just looking at an example where the formatting was applied to some HTML? Do use the formatting, Python is impossible to check without it.
And yes, you could code it using *args but it's simpler to just have two parameters.
![Brian Minkin](https://secure.gravatar.com/avatar/40d50e241fae9fbf3034b8edfcf3cbef?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Brian Minkin
Courses Plus Student 795 PointsI 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.
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsCan you show the code (with formatting) that you have now?
![Brian Minkin](https://secure.gravatar.com/avatar/40d50e241fae9fbf3034b8edfcf3cbef?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Brian Minkin
Courses Plus Student 795 Pointsdef combo(a,b):
my_tuple = []
for i in range(len(a)):
c = (a[i], b[i])
my_tuple.append(c)
return my_tuple
</p>
![Brian Minkin](https://secure.gravatar.com/avatar/40d50e241fae9fbf3034b8edfcf3cbef?s=60&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Brian Minkin
Courses Plus Student 795 Pointsok, I have no idea how to get rid of last tag. Anyhow you can see the bit of code.
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsI don't see anything wrong except for that stray HTML paragraph tag.
So I pasted the rest of it directly into the challenge and it passed.
![Brian Minkin](https://secure.gravatar.com/avatar/40d50e241fae9fbf3034b8edfcf3cbef?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Brian Minkin
Courses Plus Student 795 Pointsok thanks, but obviously there is a bug in the system. Is there somebody who can update my profile then?
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsI don't understand how your profile would be involved, but for system issues you should contact the Support folks.