How to get the last element of a list?

Python assigns -1 to the index of the last element of a list and you can get the last element using this index value as shown in the below example –

Leave a Reply