From a35ef06b1013834dded58f060b60115e27c1cbfc Mon Sep 17 00:00:00 2001 From: Skullheadx <704277@pdsb.net> Date: Tue, 24 Jan 2023 18:18:23 -0500 Subject: [PATCH] Create utils.py --- sorting_algorithms/utils.py | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sorting_algorithms/utils.py diff --git a/sorting_algorithms/utils.py b/sorting_algorithms/utils.py new file mode 100644 index 0000000..d499f80 --- /dev/null +++ b/sorting_algorithms/utils.py @@ -0,0 +1,4 @@ +def swap(array, index1, index2): + get = array[index1], array[index2] + array[index2], array[index1] = get + return array -- 2.54.0