How can I slice a Python list to get the first 5 elements or fewer