using .pop code example Example: pop list python Click to copy#pop removes the last element li=[1,2,3,4,5] li.pop() #>>>[1, 2, 3, 4]