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
It doesn't work as you expect because strip is character based. You need to do this instead:
foo = foo.replace(' ', '')[:-3].upper()