filmov
tv
Python program to find the largest and smallest number in a list #JackCoding

Показать описание
Read the input number asking for the length of the list using input() or raw_input().
Initialize an empty list lst = [].
Read each number using a for loop.
In the for loop append each number to the list.
Now we use a predefined function max() to find the largest element in a list.
Similarly, we use another predefined function min() to find the smallest element in a list.
Initialize an empty list lst = [].
Read each number using a for loop.
In the for loop append each number to the list.
Now we use a predefined function max() to find the largest element in a list.
Similarly, we use another predefined function min() to find the smallest element in a list.