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
Logan ValdezCourses Plus Student 6,741 Points
How can I fix my code
Hello. In challenge 4 of 4 I am supposed to return all even items in reverse, however I am stumped. How can I fix my code.
return the_other_list[:4] + the_other_list[-4:]
Alex KoumparosPython Development Techdegree Student 36,887 Points
You can't solve this with a single slice. So you'll need to do it in two steps: first, create a slice that is only evens. Next perform a reverse on it.
You already know how to create a slice of only odds, so you should be able to make a slice of only evens. I think you can figure out to create a slice that is a reverse of another slice, but if you can't, let me know and I'll give you some hints.