mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 01:09:40 +08:00
Fix: typo in multiple files.
This commit is contained in:
@ -41,7 +41,7 @@ def bogosort(collection):
|
||||
if __name__ == '__main__':
|
||||
import sys
|
||||
|
||||
# For python 2.x and 3.x compatibility: 3.x has not raw_input builtin
|
||||
# For python 2.x and 3.x compatibility: 3.x has no raw_input builtin
|
||||
# otherwise 2.x's input builtin function is too "smart"
|
||||
if sys.version_info.major < 3:
|
||||
input_function = raw_input
|
||||
|
@ -41,7 +41,7 @@ def bubble_sort(collection):
|
||||
|
||||
if __name__ == '__main__':
|
||||
import sys
|
||||
# For python 2.x and 3.x compatibility: 3.x has not raw_input builtin
|
||||
# For python 2.x and 3.x compatibility: 3.x has no raw_input builtin
|
||||
# otherwise 2.x's input builtin function is too "smart"
|
||||
if sys.version_info.major < 3:
|
||||
input_function = raw_input
|
||||
|
@ -23,7 +23,7 @@ def cocktail_shaker_sort(unsorted):
|
||||
if __name__ == '__main__':
|
||||
import sys
|
||||
|
||||
# For python 2.x and 3.x compatibility: 3.x has not raw_input builtin
|
||||
# For python 2.x and 3.x compatibility: 3.x has no raw_input builtin
|
||||
# otherwise 2.x's input builtin function is too "smart"
|
||||
if sys.version_info.major < 3:
|
||||
input_function = raw_input
|
||||
|
@ -21,7 +21,7 @@ def gnome_sort(unsorted):
|
||||
if __name__ == '__main__':
|
||||
import sys
|
||||
|
||||
# For python 2.x and 3.x compatibility: 3.x has not raw_input builtin
|
||||
# For python 2.x and 3.x compatibility: 3.x has no raw_input builtin
|
||||
# otherwise 2.x's input builtin function is too "smart"
|
||||
if sys.version_info.major < 3:
|
||||
input_function = raw_input
|
||||
|
@ -41,7 +41,7 @@ def insertion_sort(collection):
|
||||
if __name__ == '__main__':
|
||||
import sys
|
||||
|
||||
# For python 2.x and 3.x compatibility: 3.x has not raw_input builtin
|
||||
# For python 2.x and 3.x compatibility: 3.x has no raw_input builtin
|
||||
# otherwise 2.x's input builtin function is too "smart"
|
||||
if sys.version_info.major < 3:
|
||||
input_function = raw_input
|
||||
|
@ -64,7 +64,7 @@ def merge_sort(collection):
|
||||
if __name__ == '__main__':
|
||||
import sys
|
||||
|
||||
# For python 2.x and 3.x compatibility: 3.x has not raw_input builtin
|
||||
# For python 2.x and 3.x compatibility: 3.x has no raw_input builtin
|
||||
# otherwise 2.x's input builtin function is too "smart"
|
||||
if sys.version_info.major < 3:
|
||||
input_function = raw_input
|
||||
|
@ -42,7 +42,7 @@ def quick_sort(ARRAY):
|
||||
if __name__ == '__main__':
|
||||
import sys
|
||||
|
||||
# For python 2.x and 3.x compatibility: 3.x has not raw_input builtin
|
||||
# For python 2.x and 3.x compatibility: 3.x has no raw_input builtin
|
||||
# otherwise 2.x's input builtin function is too "smart"
|
||||
if sys.version_info.major < 3:
|
||||
input_function = raw_input
|
||||
|
@ -44,7 +44,7 @@ def selection_sort(collection):
|
||||
|
||||
if __name__ == '__main__':
|
||||
import sys
|
||||
# For python 2.x and 3.x compatibility: 3.x has not raw_input builtin
|
||||
# For python 2.x and 3.x compatibility: 3.x has no raw_input builtin
|
||||
# otherwise 2.x's input builtin function is too "smart"
|
||||
if sys.version_info.major < 3:
|
||||
input_function = raw_input
|
||||
|
@ -45,7 +45,7 @@ def shell_sort(collection):
|
||||
|
||||
if __name__ == '__main__':
|
||||
import sys
|
||||
# For python 2.x and 3.x compatibility: 3.x has not raw_input builtin
|
||||
# For python 2.x and 3.x compatibility: 3.x has no raw_input builtin
|
||||
# otherwise 2.x's input builtin function is too "smart"
|
||||
if sys.version_info.major < 3:
|
||||
input_function = raw_input
|
||||
|
Reference in New Issue
Block a user