How to replace characters which are present only at the word boundary (start or end) in python?
a = "Hello;World;"
expected output
"Hello;World"
Also at later stage if I want to replace special characters only if they are present inside the word and not at boundary For example:
a = "Hello;World;"
expected output
"Hello-World;"
Well
format
can handle this, of that I'm sure: