Answers for "python last element of list using reverse() function"

0

python last element of list using reverse() function

# Python code to access the last element
# in a list using reverse() method
  
# Declaring and  initializing list 
number_list = [2, 1, 7, 4, 5, 3,6]
  
print ("List of elements are : " + str(number_list))

# using reverse method to print last element
number_list.reverse()
print("The last element of list using reverse method are : "
                            +  str(number_list[0]))
Posted by: Guest on September-08-2021

Code answers related to "python last element of list using reverse() function"

Python Answers by Framework

Browse Popular Code Answers by Language