mylist = [0, 1, 2] mylist[-1] = 3 # sets last element print(myList[-1]) # prints Last element
MyList=["Black","Blue","Red","Green"] print(MyList[-1])