Replace rstrip with re.sub
With rstrip we specify a set of characters to be removed. We want to remove a substring hence the use of re.sub. (rstrip produces wrong results in many cases)
Please register or sign in to comment
With rstrip we specify a set of characters to be removed. We want to remove a substring hence the use of re.sub. (rstrip produces wrong results in many cases)