Jinman Kim5,433 Points
Does anyone have an answer to this question?
I figured out that I can't go from negative index to positive index or vice versa. Okay, so that's fine, I will combine the two lists (first 4 and last 4). Although that gives me a right answer from the workspace REPL, it gives me an error from the quiz. Can anyone please tell me why?
def first_4(word): return word[:4] def first_and_last_4(word): return word[0:4] + word[-1:-5:-1]
Steven Parker155,412 Points
This code is returning the last four items in reverse order, but reversing the order is not part of the challenge instructions. To pass the challenge, your function should return the first and last four items in their original order.