From c2eb8e633cff1031646a830d6c09db752a8d8310 Mon Sep 17 00:00:00 2001 From: Mateusz779 <73058906+Mateusz779@users.noreply.github.com> Date: Wed, 15 Dec 2021 19:41:30 +0100 Subject: [PATCH] Add files via upload --- bubble_sort_py/bubble_sort_py.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bubble_sort_py/bubble_sort_py.py b/bubble_sort_py/bubble_sort_py.py index 69ca074..55559a8 100644 --- a/bubble_sort_py/bubble_sort_py.py +++ b/bubble_sort_py/bubble_sort_py.py @@ -12,9 +12,7 @@ def sort_func(sort=[],repeat=False): while (t): for i in range(0,le-1): if sort[i] > sort[i + 1]: - tmp1 = sort[i]; - sort[i] = sort[i + 1]; - sort[i + 1] = tmp1; + sort[i], sort[i + 1] = sort[i + 1], sort[i]; j = 0; elif sort[i] == sort[i + 1] and repeat==False: del sort[i]