Answers for "get last index list python"

0

python last element of list

# to print the last item from a list
print(list[-1])
Posted by: Guest on January-30-2021
0

python last item in list

some_list = [1,2,3]
some_list[-1] is the shortest and most Pythonic.
#output = 3
Posted by: Guest on August-03-2021

Python Answers by Framework

Browse Popular Code Answers by Language