From 17cebbaa63e27819dc49212207799524a22c6cc4 Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sat, 3 Jul 2021 17:17:30 +0800 Subject: [PATCH] save project --- diy2.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/diy2.py b/diy2.py index 395ed67..81338bd 100644 --- a/diy2.py +++ b/diy2.py @@ -1 +1,7 @@ -alist = [88, 75, 72, 82, 90, 85, 78, 91] \ No newline at end of file +alist = [88, 75, 72, 82, 90, 85, 78, 91] +n=len(alist) +for i in range(0,n-1): + for b in range(0,n-1): + if alist[b]>alist[b+1]: + alist[b],alist[b+1]=alist[b+1],alist[b] + print(alist) \ No newline at end of file -- libgit2 0.25.0