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 trialLukas Johmann
911 PointsNo Idea how to complete or even approach this Challenge
Hello fellow Treehousers, I have problems understanding what to do in this challenge. I have no Idea how the program can see the difference between a musical group and an artists when I don't even know who or what this code is refering to. I am very confused, since english is my 2nd language I don't see how this is possible.
Task 1 of 2 : Here is a multi-dimensional list of musical groups. The first dimension is group, the second is group members.
Can you loop through each group and output the members joined together with a ", " comma space as a separator, please?
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"],
]
for group in musical_groups:
print("," groups)
# Your code here
2 Answers
Schaffer Robichaux
21,729 PointsHey Lukas,
English is my first language and I find some of the instructions confusing as well. Hopefully it helps if we dig through the instructions a little more closely- step by step.
Can you 1. loop through each group and output the members 2. joined together with a 3. ", " comma space as a separator, please?
step 1. *Loop through the members of musical_groups
for member in musical_groups: # <-- you had the for loop correct
- step 2 and 3. As member is iteratively assigned a value in the loop, you need to *join them together with the proper string formatting*
print(#use required format and join method(member)) #<-- remember that your variable(member)...
#...has to be the same as when it was assigned( not plural )
If you are confused by the .join method, here is a link with some helpful examples.
Hope this helps, and please ask again if you are still having trouble.
Lukas Johmann
911 PointsThanks to your step by step explanation of plural and non-plural. I'm able to understand and use the .join method correctly. I appreciate your kind advice and the helpful link! You're awesome!