I\'m trying to remove the last 3 characters from a string in python, I don\'t know what these characters are so I can\'t use rstrip, I also need to remove any white
rstrip
>>> foo = "Bs12 3ab" >>> foo[:-3] 'Bs12 ' >>> foo[:-3].strip() 'Bs12' >>> foo[:-3].strip().replace(" ","") 'Bs12' >>> foo[:-3].strip().replace(" ","").upper() 'BS12'