De-dupe and sort list at the same time



myList = ['b','c','a','a']


myList = sorted(set(myList))







Credits:
https://stackoverflow.com/questions/479897/how-to-remove-duplicates-from-python-list-and-keep-order

Comments

Popular posts from this blog

Dive into the World of Fractional Shares: Your Path to Diversified Investments

High Gas Prices: How They Impact You and the Economy

Unlocking the Door to Your Dream Home: Strategies for First-Time Buyers