Skip to content

Commit 2f0b7af

Browse files
tsik1berquist
authored andcommitted
Variable name change (#586)
The current variable name 'number' is a little generic and it doesn't really point to an array. It may confuse a beginner
1 parent 10cb225 commit 2f0b7af

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

contents/bubble_sort/code/python/bubblesort.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ def bubble_sort(array):
99
array[j], array[j+1] = array[j+1], array[j] #swap elements in the list
1010

1111
def main():
12-
number = [random.randint(0, 1000) for _ in range(10)]
13-
print("Before Sorting {}".format(number))
14-
bubble_sort(number)
15-
print("After Sorting {}".format(number))
12+
random_array = [random.randint(0, 1000) for _ in range(10)]
13+
print("Before Sorting {}".format(random_array))
14+
bubble_sort(random_array)
15+
print("After Sorting {}".format(random_array))
1616

1717
main()

0 commit comments

Comments
 (0)