Python Introducing Lists Build an Application Multidimensional Musical Groups

Michael Akamihe
Michael Akamihe
767 Points

help with groups.py 2/2

i literally give to program what it wants and it gives me an error. this is really annoying cause i need to solve this to proceed

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"],
]
# Your code here
for musical_group in musical_groups:
    musical_group_line = ", ".join(musical_group)
    print("musical groups:  " + musical_group_line)
for musical_group in musical_groups:
    if len(musical_group) == 3:
        print(', '.join(musical_group))

1 Answer