Bapi

11%
Flag icon
You can also sort this list in reverse alphabetical order by passing the argument reverse=True to the sort() method. The following example sorts the list of cars in reverse alphabetical order: cars = ['bmw', 'audi', 'toyota', 'subaru'] cars.sort(reverse=True) print(cars)
Python Crash Course: A Hands-On, Project-Based Introduction to Programming
Rate this book
Clear rating