I have a list of tuples or a tuple of tuples and I want to swap the tuples like in the next example:
>>> swap([('abc', 'bcd'), ('efg', 'zza')])
[('efg', 'zza'), ('abc', 'bcd')]
I want to swap the tuples from the list based on the third character of the second element of every tuple.