Answers for "how do i print the first element and the last element, then the second and second last element of an array in python"

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 "how do i print the first element and the last element, then the second and second last element of an array in python"

Python Answers by Framework

Browse Popular Code Answers by Language