How to sort a list of strings alphabetically in reverse order with Python

1 Answer

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

lst.sort(reverse=True)

print(lst)



'''
run:

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

'''

 



answered Jan 21, 2020 by avibootz

Related questions

2 answers 222 views
1 answer 173 views
2 answers 223 views
1 answer 155 views
1 answer 232 views
...