I'm pretty sure you need two calls to re.sub. This isn't a Python issue so much as a regular expression issue, and as far as I know this isn't possible.
Python.Org is the official source for documentation and beginner guides. Codecademy and Coursera offer interactive courses for learning Python basics. Think Python provides a free e-book for a ...