Add a list.swap_values method
I would like to propose adding a new built-in method to Python lists for swapping two specific values: list.swap_values(v1, v2, all_occurrences=True). Currently, swapping values within a list requires complex loops or long list comprehensions. I…