human
swap values in a tuple/list inside a list in python?
assistant
Here is some code to swap values in a tuple/list in list `mylist`

[(t[1], t[0]) for t in mylist]

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