How to sort a list of strings in alphabetical order with Python

1 Answer

0 votes
lst = ['python', 'c', 'php', 'java', "c#"] 

lst.sort()

print(lst)



'''
run:

['c', 'c#', 'java', 'php', 'python']

'''

 



answered Jan 21, 2020 by avibootz
...