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 trialMaria Tello
950 PointsMaking lists in python
are the following list1 and list2 equivalent? list1 = { "a", "b" } , list2 = [ "a", "b" ]
1 Answer
matth89
17,826 PointsIn your example, list1 is actually a set, and not a list (which you'll learn about in an upcoming course). List2 would be the proper syntax for creating a list.
Maria Tello
950 PointsMaria Tello
950 Pointsthank you Matt! I was confused because both were accepted in the challenge but now I get it :)
matth89
17,826 Pointsmatth89
17,826 PointsHappy to help.