fork download
  1. def remover_ultimo_elemento(lista):
  2. lista.pop()
  3.  
  4. lista = [1, 2]
  5. remover_ultimo_elemento(lista)
  6.  
  7. print(lista) # [1]
Success #stdin #stdout 0.04s 9404KB
stdin
Standard input is empty
stdout
[1]