python
Grant Edwards
grant.b.edwards at gmail.com
Sun Feb 23 10:52:25 EST 2020
On 2020-02-22, Python <python at python.invalid> wrote:
> lberia460 at gmail.com wrote:
>> hi guys can you help me.how to find maximum and minimum in list using while loop python
>
> l = [1, 4, 2, -1, 0, 4, 2, 1, 10]
> for i in range(100):
> pass
>
> maximum = max(l)
> minimum = min(l)
The requirement is to use a _while_ loop:
l = [1, 4, 2, -1, 0, 4, 2, 1, 10]
while True:
maximum = max(l)
minimum = min(l)
break
More information about the Python-list
mailing list