Obtenha todos os itens, exceto o último item da lista de Python

x = [1, 2, 3, 4]

#same array, but the last item.
notLast = x[0:-1]
Aggam R.