Comment échapper à la barre oblique inverse et apostrophe ou guillemet en Python?

Comment échapper à une barre oblique et un guillemet simple ou double quote dans python
Par exemple :

Long string = '''some 'long' string \' and \" some 'escaped' strings'''
value_to_change = re.compile( A EXPRESION TO REPRESENT \' and \" )
modified = re.sub(value_to_change , 'thevalue' , Long_string )

## Desired Output 
modified = '''some 'long' string thevalue and thevalue some 'escaped' strings'''

Thx avancé !

OriginalL'auteur Florin | 2011-07-16