From 0a961d18b0b100a39f2626aafdd5bf13cc79a1c0 Mon Sep 17 00:00:00 2001 From: Lt-grint Date: Wed, 27 Feb 2019 11:18:58 +0800 Subject: [PATCH] update bubble_sort use tuple --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index efff5f76c..50794e752 100644 --- a/README.md +++ b/README.md @@ -77,9 +77,7 @@ def bubble_sort(lst): for passnum in range(len(lst) - 1, 0, -1): for i in range(passnum): if lst[i] > lst[i + 1]: - temp = lst[i] - lst[i] = lst[i + 1] - lst[i + 1] = temp + lst[i], lst[i + 1] = lst[i + 1], lst[i] ```
View Examples