+ 1
Help pls! Working with lists
In the list find the maximum element among the positive elements, of the list and the minimum among the negative elements
5 ответов
+ 4
Use min() and max(). See the output from the console:
>>> lst = [4,2,-4,11]
>>> min(lst)
-4
>>> max(lst)
11
+ 2
Lothar , sololearn wrote that there is no output(
+ 1
PUFFIN Channel, I mentioned that the try was done on the console - there you need no print() to get output. Sorry, I thought that are aware of this. 😉
0
postiv_num =[2,10,5,20,13,78,1]
nagtiv_num =[-1,-6,-7,-2,-9,-45,-78]
Print (min(postiv_num))
Print (max(nagtiv_num))
#simple