I have the following string and want to replace the last comma with an "&". I want to do it with Regex, also if it could be done without Regex. This is my example code.
mystring = "a, b, c, d"
print(re.sub(r", \w$", " & ", mystring)) # this gives me "a, b, c &"
# but I want "a, b, c & d"
Please: Before you press "close" write a comment! There is no duplicate and this should also be reproducible. See the code comments!