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 trial

Python Python Collections (2016, retired 2019) Sets First Sets

need help with First Sets (challenge task 3 of 3)

I am not sure what I am doing wrong. I am getting the error: "Bummer! Couldn't find all the songs in songs."

sets.py
songs = {"im the one", "broccile", "marmalade"}
songs.add("Treehouse Hula")
songs.update({"Python Two-step", "Ruby Rhumba"}, {"My PDF Files"})
AJ Salmon
AJ Salmon
5,675 Points

I'll admit, I was perplexed as to why your code wouldn't work as well. Took me about 15 minutes to realize that your 's' in 'Python Two-step' wasn't capitalized, so I definitely don't blame you for overlooking that one, haha. With the capitalized 'S' it works perfectly :)

6 Answers

Elgene Ee
Elgene Ee
3,554 Points

Hi ilya, Here is how I did it, your mistake is the {} brackets, try to change it to [] and it will work out fine :)

songs = {"im the one", "broccile", "marmalade"}
songs.add("Treehouse Hula")
songs.update(["Python Two-step", "Ruby Rhumba"], ["My PDF Files"])
Michael Ma
Michael Ma
4,294 Points

songs = {"rolex", "lit right now", "believer"} songs.add("Treehouse Hula") songs.update({"python Two-Step", "Ruby Rhumba"} {"My PDF Files"})

Michael Ma
Michael Ma
4,294 Points

That was my way and it worked

Michael Ma
Michael Ma
4,294 Points

You just have too capitalize the p for python. sry i didn't do that, my bad :)

It is very easy there not to notice that in "Python Two-step" there is a hyphen - and not an underscore _.Gave me a hard time!!!

songs = {"song1", "song2", "song3"} songs.add("Treehouse Hula") songs.update({"Python Two-step", "Ruby Rhumba"}) songs.update({"My PDF Files"})