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
Lyric Abbott
35,595 Pointshelp
Sort clean_list using list.sort()
my code:
messy_list = [5, 2, 1, 3, 4, 7, 8, 0, 9, -1]
messy_list = [5, 2, 1, 3, 4, 7, 8, 0, 9, -1]
clean_list = messy_list
clean_list.append("I'm a new element")
messy_list
[5, 2, 1, 3, 4, 7, 8, 0, 9, -1, "I'm a new element"]
1 Answer
Geoff Parsons
11,679 PointsThe first part of the challenge asks for you to copy the list using the slice syntax; you're just copying it directly. The next step asks you to sort the list which you're not doing here. You shouldn't need to append anything to either array here.