Get the App
SLTechnology News&Howtos  ›  Development  › 

How python uses the sorted () function

Shulou Source: shulou.com Published: 2022-06-01 02:37:39 09月21日 Update

Editor to share with you how python uses the sorted () function, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

Sorted ()

Sorted (): this function returns a sorted list of specified iterable objects.

A = ("b", "g", "a", "d", "f", "c", "h", "e") x = sorted (a) print (x)

The results are as follows:

These are all the contents of the article "how python uses the sorted () function". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Functions articles content not much most objects more knowledge results industry information information channels channels references learning help sorting iteration Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Microsoft MySQL MariaDB Xiaomi