def myfun(num): count = 0 for x in num: if x == 4: count = count + 1 return count if __name__=="__main__": print(myfun([1, 4, 6, 7, 4])) print(myfun([1, 4, 6, 4, 7, 4]))
2 3
Apply For Job
Java Material
Python Material
PLSQL Material
.Net Material
Write a Python program to find the area of a triangle.
Write a Python program to check whether a character is an alphabet or not
How do you confirm if an object is iterable using code?
Write a Python program that accepts a sequence of comma-separated numbers from the user and generates a list and a tuple of those numbers.
Write a Python program to get current time and date