Python min()

Configurare noua (How To)

Situatie

The min() function returns the smallest item in an iterable. It can also be used to find the smallest item between two or more parameters.

Solutie

Pasi de urmat

number = [3, 2, 8, 5, 10, 6]
smallest_number = min(number);
print(“The smallest number is:”, smallest_number)

Output:

The smallest number is: 2

Tip solutie

Permanent

Voteaza

(5 din 14 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?