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 (Retired) Slices Sorting Slices

why still wrong? challenge 3 of 3, messy collection

i dont kniw why it is still wrong?

messy_list = [5, 2, 1, 3, 4, 7, 8, 0, 9, -1]

# Your code goes below here

3 Answers

anil rahman
anil rahman
7,786 Points

Take out your reversed function and last line and should work

messy_list = [5, 2, 1, 3, 4, 7, 8, 0, 9, -1]

# Task 1: copy using [:] syntax
clean_list = messy_list[:]

# Task 2: sort using sort() method

# Task 3:Now, create a variable named silly_list that is every third item,
# backwards, from messy_list.
silly_list = messy_list[::-3]
Anthony Dvoracek
Anthony Dvoracek
1,141 Points

I have a question.

I had the following, and I'm curious why the following wasn't working:

silly_list = messy_list[:]


Doesn't this give you the same result, or why wouldn't this pass it?

Thank you!

anil rahman
anil rahman
7,786 Points

I don't know python, i figured it using google and stuff so i wouldn't be able tell you why your specific code wasn't viable. Maybe the code is viable but the code challenge wanted you to use a specific way and that's why it is failing it.