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 (2016, retired 2019) Slices Slice Functions

igor corrales
igor corrales
2,474 Points

I don't understand why is not working !!

It looks ok in my shell !!!

slices.py
def first_4(rango):
        b = rango[:4]
        return b 

def first_and_last_4(rango):
        b = rango[0:4]
        c = rango[-4:]
        d = b + c
        return d
nakalkucing
nakalkucing
12,964 Points

I tried pasting it into the challenge too. I didn't come up with any problems either. What error are you getting?

3 Answers

Steven Parker
Steven Parker
229,644 Points

It looks OK in the challenge, too. I pasted it directly into the challenge and it passed task 2.

igor corrales
igor corrales
2,474 Points

Hi and Thanks to reply me I getting ......so frustrated!!!

The error I'm getting is :

Bummer: Try again!

igor corrales
igor corrales
2,474 Points

Finaly It is working out !!! but I don't know why ....so probably is a bug in the system to check the code .........

nakalkucing
nakalkucing
12,964 Points

Sounds like it. Glad your code finally passed! :)