Jak uzyskać ostatnią wartość na liście Python
your_list = ["apple", "orange", "grapes"]
last_value = your_list[-1]
Fancy Fly
your_list = ["apple", "orange", "grapes"]
last_value = your_list[-1]
list = [1, 2, 3]
print(list[-1]) #prints 3