Say I have a string:
'hello$ world$ $'
How do I remove only the second occurrence of the $
Or if I have str'ing'h
How do I use re.sub()
to only remove the second apostrophe?
Without writing a big long function that breaks it into each character finds the index of all the apostrophes etc.