?
Which built-in function is used to find the smallest item in an iterable?
Answer & Solution
Correct Answer:
Option
A
The correct answer is Option A: min().
The min() function is used to find the smallest item in an iterable, such as a list, tuple, or set.
It takes an iterable as an argument and returns the smallest item.
For example:
The min() function is used to find the smallest item in an iterable, such as a list, tuple, or set.
It takes an iterable as an argument and returns the smallest item.
For example:
numbers = [5, 2, 8, 1, 6]
smallest_number = min(numbers)
print(smallest_number) # Output: 1
Join the Discussion
Login to post a comment or share your explanation.
Login