Python Introducing Lists Build an Application Multidimensional Musical Groups

Maba Bah
Maba Bah
907 Points

I'm completely stomped, someone please help

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: for group_members in group: group = group_members.join(", ") print(group) If I'm reading the instructions correctly I'm supposed to have all the members in their lists separated by a comma space.

groups.py
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:
    for group_members in group:
        group = group_members.join(", ")
        print(group)
Katherina Kallis
Katherina Kallis
3,379 Points

I don't think your question is clear. What is it that you need to do? Maybe you can copy paste the instructions in your question description?

1 Answer

Steven Parker
Steven Parker
200,698 Points

You're close, but the syntax of "join" is reversed.
The "join" method should be called on the string, and the list is passed as the argument.