Answers for "return first and last element of list"

0

indexing python first and last

l = [1,2,3,4,5]
l[::len(l)-1]
Posted by: Guest on March-23-2020

Code answers related to "return first and last element of list"

Python Answers by Framework

Browse Popular Code Answers by Language