Definition: In this task, you are given a list of unique integers you need to swap the positions of maximum and minimum element in the list and return the updated list.
Input: [31, 364, 162, 376, 36, 497, 64, 10, 403, 264, 166, 426, 308, 232, 95, 406, 33, 170, 40, 311]

[31, 364, 162, 376, 36, 10, 64, 497, 403, 264, 166, 426, 308, 232, 95, 406, 33, 170, 40, 311]