Python Introducing Lists Build an Application Multidimensional Musical Groups

Bernard Ruziye
Bernard Ruziye
1,377 Points

how should the output of this challenge look like

i cant find what is wrong with my code
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"],
group = 1
for musical_group in musical_groups:
    print("group {}  {} ".format(group, ",".join(musical_group)))
    group += 1

1 Answer

Megan Amendola
.a{fill-rule:evenodd;}techdegree seal-36
Megan Amendola
Treehouse Teacher

The challenge is asking for 'output the members joined together with a ", " comma space as a separator'. It only wants the members printed with commas and space between their names like this: Ad Rock, MCA, Mike D.

for group in musical_groups:
    print(', '.join(group))