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 trialMatt Fuller
8,831 PointsIntroducing lists - challenge task 1 of 2
I'm struggling here... total noob to coding.
how do I resolve this?
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:
print("in this group there is: ")
band_members = ', '.join(muscial_groups)
print(band_members)
1 Answer
Steven Parker
231,275 PointsYou're close, but:
- you spelled "muscial_groups" instead of "musical_groups"
- you will need to join the individual group (singular) instead of the whole array
Also, for best results with challenges, do only what the instructions ask. For this one you don't need to print anything besides the joined group.
Matt Fuller
8,831 PointsMatt Fuller
8,831 PointsSteven, you seem to be my learning Guru at the moment, you answered my last query also. Thank you!
Damn, silly mistake. thank you.
This is the part I don't understand. How do I do this?
Apologies if my questions are a bit stupid, I work ten hour shifts 6 days a week so I'm currently attempting to self learn on my lunch breaks for an hour each day. Problem is with this is that I forget lots of what I've already learned, so some of my questions might be incredibly basic. I appreciate your help.
Steven Parker
231,275 PointsSteven Parker
231,275 PointsThe whole array is "musical_groups" (plural). The individual group is "musical_group" (singular). So:
band_members = ', '.join(musical_group) # no "s" at the end
Matt Fuller
8,831 PointsMatt Fuller
8,831 PointsWow... I think my issue is more attention to detail, which is crucial in coding!
Got it, thank you.