Question #264570

a python program to Count of negative elements in the list (-7-9 3 4 5 -6 -8 2)


Expert's answer

 def l_count(list1):
    j = 0
    for i in list1:
        if i < 0:
            j = j + 1
    return j
l_count([-7,-9,3,4,5,-6,-8,2])
4
LATEST TUTORIALS
APPROVED BY CLIENTS