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!
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
Jaime Castillo5,800 Points
It is glitching, It saids it is wrong. I am on the third one and it saids I am on the second one.
My code: def odds(iter): return iter[1::2]
def first_4(iter): return iter[:4] def first_and_last_4(iter): return iter[:4] + iter[4:]
Steven Parker227,167 Points
This code does not solve the task 2 challenge to create "first_and_last_4". You seem to have the right idea, but the implementation isn't quite right.
Hint: check the slice arguments for "last 4".