<human>:  Python string replace two things at once?
<bot>: Here is some code to replace each 'a' with 'b' and each 'b' with 'a' in the string 'obama' in a single pass.

"""obama""".replace('a', '%temp%').replace('b', 'a').replace('%temp%', 'b')

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.