📅  最后修改于: 2022-03-11 14:45:18.278000             🧑  作者: Mango
# 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]))