python remove right characters from variable in string code example Example: take off character in python string s = 'abc12321cba' print(s.replace('a', ''))