Friday, May 10, 2019

How To Sort a List In Descending Order In Python

PYTHON













Sort a List In Descending Order:

Sorted method allows you to sort a list in Descending Order.


letters = ['a', 'b', 'c', 'd', 'e', 'f']
print(sorted(letters, reverse = True))

letters = ['g', 'h', 'i', 'j', 'k', 'l']
print(sorted(letters, reverse = True))

letters = ['m', 'n', 'o', 'p', 'q', 'r']
print(sorted(letters, reverse = True))
I Hope You Like This "How To Sort a List In Descending Order In Python" Article, Please Don't Forget To Share This Article With Your Friends.

No comments:

Post a Comment

close