+ 1
How do you determine the highest number in lists.. Like for example: for a in [55,6,7,32,12]… need to print the largest only
for loop pin python 3
6 Respuestas
+ 4
You can use min & max to get least and largest value off a list, as follows:
a=[3,9,45,72,1]
print("Max value: ", max(a))
print("Min value: ", min(a))
Hth, cmiiw
+ 2
is it the same with the command
for a in[5,76,87,8,]: ? ??
its in our ass hahaha...
+ 1
You're welcome mate, glad if it helps : )
+ 1
@sam
what u do with for loops...
its same as that..
the max min function..
difference is its already implemented in py-package....
use it..
but first do on ur own using loops..
0
i already got it thank you guys
0
by max(a)