If I'm having to deal with incessant backslashes in a string I'll often use the r'\' (raw string literal) syntax. Simplifies things quite a bit.