Periksa apakah elemen terakhir dalam daftar python
if x == my_list[-1]:
# do what you want
Marton
if x == my_list[-1]:
# do what you want
list1 = ['a','b','c']
print(list1[-1])