Closed IamRezaMousavi closed 4 months ago
For get the last index of a list (or tuple) don't need to calculate length of the list Just use -1 instead of list index
(m[len(m) - 1] == m[-1] --> True)
For get the last index of a list (or tuple) don't need to calculate length of the list Just use -1 instead of list index
(m[len(m) - 1] == m[-1] --> True)