I have the strings \'80010\', \'80030\', \'80050\' in a list, as in
test = [\'80010\',\'80030\',\'80050\']
How can I delete the very last
Just to show a slightly different solution than comprehension, Given that other answers already explained slicing, I just go through at the method.
With the map function.
test = ['80010','80030','80050']
print map(lambda x: x[:-1],test)
# ['8001', '8003', '8005']
For more information about this solution, please read the brief explanation I did in another similar question.
Convert a list into a sequence of string triples