PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
'''
Please directly input the things you would like to be alphabetized of arranged
numerically from least to greatest separated by spaces.
~Example_0: "hello this is a test"
~Example_1: "6 3 0 -72 100 1 78 345"
*Note: Quotation marks are not needed and is easier to read when they are not present
'''
#DEFining the function
def alphabetize(list):
#variable assigned to user input and splitting it at every whitespace
list = input().split(" ")
#variable assigned to the newly created alphabatized list
sort = sorted(list)
#returning the list
return sort
#printing function to the output screen
print(alphabetize(list))
#SoloLearn code playground does not allow me to just call the function
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run