Python cara mendapatkan elemen terakhir dalam daftar
some_list = [1, 2, 3]
some_list[-1]
print(some_list)
#Output = 3
Condemned Cottonmouth
some_list = [1, 2, 3]
some_list[-1]
print(some_list)
#Output = 3
list1 = [1, 2, 3, 4, 5]
print(list1[len(list1)-1])
print(list1[-1])
print(list1.pop())