I have a string, example:
s = "this is a string, a"
Normally, you would just do:
s = s[:-3] + s[-2:]
s[:-3] gives you a string up to, but not including, the comma you want removed (
"this is a string") and the
s[-2:] gives you another string starting one character beyond that comma (
Then, joining the two strings together gives you what you were after (
"this is a string a").