Why Showing keyword error?

LQCAP
Dear Sir,

I have defined my class and as per my condition want to use the last value from the list. But, when I am coding to get the last value from the list using the list[-1] method. It is showing me the key error -1.

Please suggest me the solution.

Thanking you in anticipation of your kind consideration

Yours Faithfully

Bhavik Raval
This discussion has been closed.