Skip to content

Commit 4d184a1

Browse files
authored
Update Bubble_Sort.py
1 parent 58c0e20 commit 4d184a1

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

Sorting/Bubble_Sort.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ def Bubble_sort(arr):
1414
if not swapped:
1515
break
1616

17-
arr=[12,10,9,5,7,2,50,1]
18-
print(f"Unsorted list:{arr}")
17+
if __name__=="__main__":
18+
arr=[12,10,9,5,7,2,50,1]
19+
print(f"Unsorted list:{arr}")
1920

20-
Bubble_sort(arr)
21-
print(f"Sorted list:{arr}")
21+
Bubble_sort(arr)
22+
print(f"Sorted list:{arr}")

0 commit comments

Comments
 (0)