0 votes
in Python Flask by
Write a code to sort a numerical list in Python?

1 Answer

0 votes
by

The following code can be used to sort a numerical list in Python:

list = [“2”, “5”, “7”, “8”, “1”]

list = [int(i) for i in list]

list.sort()

print (list)

...