Skip to content

Commit 7ae9759

Browse files
Added some other spaces
1 parent 8d06eb2 commit 7ae9759

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Diff for: sorts/quick_sort.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ def quick_sort(ARRAY):
2929
>>> quick_sort([-2, -5, -45])
3030
[-45, -5, -2]
3131
"""
32-
ARRAY_LENGTH=len(ARRAY)
32+
ARRAY_LENGTH = len(ARRAY)
3333
if( ARRAY_LENGTH <= 1):
3434
return ARRAY
3535
else:
3636
PIVOT = ARRAY[0]
37-
GREATER = [element for element in ARRAY[1:] if element > PIVOT]
38-
LESSER = [element for element in ARRAY[1:] if element <= PIVOT]
37+
GREATER = [ element for element in ARRAY[1:] if element > PIVOT ]
38+
LESSER = [ element for element in ARRAY[1:] if element <= PIVOT ]
3939
return quick_sort(LESSER) + [PIVOT] + quick_sort(GREATER)
4040

4141

@@ -50,5 +50,5 @@ def quick_sort(ARRAY):
5050
input_function = input
5151

5252
user_input = input_function('Enter numbers separated by a comma:\n')
53-
unsorted = [int(item) for item in user_input.split(',')]
54-
print(quick_sort(unsorted))
53+
unsorted = [ int(item) for item in user_input.split(',') ]
54+
print( quick_sort(unsorted) )

0 commit comments

Comments
 (0)