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 trialAuceanne Richer
513 PointsUnable to finish Challenge Task 2
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(group) print(", ".join(group))
The below is for challenge 2: for group in musical_groups: if len(group) == 3: print(", ".join(group))
I'm not sure why this isn't passing the second challenge, as I feel like the code is specifically stating to print based upon the restriction of the lists' length equally to 3.
What am I missing?
1 Answer
Chris Freeman
Treehouse Moderator 68,457 PointsHey Auceanne Richer, your code actually works fine! The issue may be that youβre leaving both solutions in place instead of modifying Task 1 code to solve task 2. If submitted individually, the code passes the challenge.
Post back if you need more help. Good luck!!!