I wrote simple list of elements then I sort it out but, the sorted list is:
lis = ["P1","P3","P4","P11","P22"]
lis.sort()
print(lis)
The output will be:
['P1', 'P11', 'P22', 'P3', 'P4']
but I would expected list:
['P1', 'P3', 'P4', 'P11', 'P22']
as the 11
and 22
are bigger than 3
and 4
.
I know that it is string list but can I do it somehow?