lists = [1 , 2, 3, 4, 5]

print(f'First element is  {lists[0]}')
print(f'Last element is  {lists[-1]}')

#Вариант 2
print('')
print(f'First element is  {lists[:1]}')
print(f'First element is  {lists[4:]}')