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.

how do you do the second task

slices.py
```def first_4(liste):
return liste[:4]

def first_and_last_4(liste2):
return liste2[:4:-5:-1]
```

You will need to add two slices together for the first_and_last_4 piece. You already solved the first four problem so you can use that code and then add '+' another slice of just the last four. You can use negative indexes to indicate from the end.

what do you mean like this?

return liste2[:4] +[:-5:-1]

You are on the right track, try forgetting about the first 4 for now since you already have that down. to just create a slice of the last four, you need the name of the list, and start/end locations. so it should look like liste2[-#:]. When you add that extra -1 at the end, you are basically saying you want to keep every other index.

i've tried again and i still say it's wrong but i get the right result when i run it on my python shell on my pc

i used this code this time:

def first_and_last_4(liste2) return liste2[:4] + liste2[-4::1]

```def first_and_last_4(liste2):