0
Need a python program to find the number of negative elements in an array.. Anyone help me out..
6 odpowiedzi
+ 6
return sum([1 for i in array if i < 0])
+ 5
well put it inside a function then (;
+ 2
list comprehension is pretty good (;
+ 1
Wow that's cool Maya! I didn't know you could create a list by prefixing a for loop.
0
tq
0
this program showing error as " return outside function"