Skip to content

Instantly share code, notes, and snippets.

@hta218
Created June 27, 2018 13:25
Show Gist options
  • Save hta218/102ebfd0c45153a68843ea1c22d63875 to your computer and use it in GitHub Desktop.
Save hta218/102ebfd0c45153a68843ea1c22d63875 to your computer and use it in GitHub Desktop.
numbers = [2018, 1, 5, 0, -10, 20, 15, -7]
sorted_numbers = []
sorting = True
while sorting:
min_numb = min(numbers)
sorted_numbers.append(min_numb)
numbers.remove(min_numb)
if len(numbers) == 0:
sorting = False
print(*sorted_numbers)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment