Examveda

What does the built-in function sorted() do in Python?

A. Returns a sorted list of the specified iterable

B. Converts a string to lowercase

C. Returns the square of a number

D. Returns the absolute value of a number

Answer: Option A

Solution (By Examveda Team)

The sorted() function in Python takes an iterable as an argument and returns a new sorted list containing all items from the iterable in ascending order.

This Question Belongs to Python Program >> Python Built In Functions

Join The Discussion

Related Questions on Python Built In Functions