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)
![Grayden Kellogg](https://secure.gravatar.com/avatar/6c79d22872980db5156244fa0941e131?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Grayden Kellogg
Python Development Techdegree Student 1,826 PointsPrinting lists that have 3 objects from a multidimensional list.
My output is showing the desired result but I am getting an error that I don't understand.
musical_groups = [
["Ad Rock", "MCA", "Mike D."],
["John Lennon", "Paul McCartney", "Ringo Starr", "George Harrison"],
["Salt", "Peppa", "Spinderella"],
["Rivers Cuomo", "Patrick Wilson", "Brian Bell", "Scott Shriner"],
["Chuck D.", "Flavor Flav", "Professor Griff", "Khari Winn", "DJ Lord"],
["Axl Rose", "Slash", "Duff McKagan", "Steven Adler"],
["Run", "DMC", "Jam Master Jay"],
]
# Your code here
for groups in musical_groups:
musical_groups2 = ", ".join(groups)
if len(groups) == 3:
print(groups)
4 Answers
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsThe selection logic is fine. But I'm guessing you intended to print out the formatted version of the list (musical_groups2) instead of the raw list (groups).
![MICHAEL WANSLEY](https://secure.gravatar.com/avatar/211b59aca490bbfe5f2c274398843d91?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
MICHAEL WANSLEY
1,229 PointsI'm not sure why I can pass the first part of the challenge but not the trio section, even though the second for loop prints the correct group names.
```musical_groups = [ ["Ad Rock", "MCA", "Mike D."], ["John Lennon", "Paul McCartney", "Ringo Starr", "George Harrison"], ["Salt", "Peppa", "Spinderella"], ["Rivers Cuomo", "Patrick Wilson", "Brian Bell", "Scott Shriner"], ["Chuck D.", "Flavor Flav", "Professor Griff", "Khari Winn", "DJ Lord"], ["Axl Rose", "Slash", "Duff McKagan", "Steven Adler"], ["Run", "DMC", "Jam Master Jay"], ]
s = ", " band = []
for groups in musical_groups: band = s.join(groups) print(band)
for i in musical_groups: if len(i) == 3: print(str(i) + " are part of a trio.")
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsThis is one of the rare occasions where the instructions tell you to modify the code from the previous step. So after task 2, there should still be only one loop.
And for future issues, always start a new question instead of asking one in an "answer". That will give you a better chance to be seen by more students and get a rapid reply.
![MICHAEL WANSLEY](https://secure.gravatar.com/avatar/211b59aca490bbfe5f2c274398843d91?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
MICHAEL WANSLEY
1,229 PointsThis is the error message I get. There doesn't seem to be an easy way to upload a screen shot...
"Bummer: AssertionError: 'Ad Rock, MCA, Mike D.' not found in "['Ad Rock', 'MCA', 'Mike D.']\n['Salt', 'Peppa', 'Spinderella']\n['Run', 'DMC', 'Jam Master Jay']" : Hmmm...I'm not getting the output I expected."
![MICHAEL WANSLEY](https://secure.gravatar.com/avatar/211b59aca490bbfe5f2c274398843d91?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
MICHAEL WANSLEY
1,229 PointsAH HAAAAAA!!! The answer is, print the value of the .join()!!!! It'd be nice if the req was a bit more informative. But that's just my 'manual tester mind' bitchin about documentation again, LOL!!!!
Grayden Kellogg
Python Development Techdegree Student 1,826 PointsGrayden Kellogg
Python Development Techdegree Student 1,826 PointsI'm supposed to print only trios. Groups of 3 members.