How to best write a Python function (check_list) to efficiently test if an element (x) occurs at least n times in a list (l
check_list
x
n
l
c=0 for i in l: if i==k: c+=1 if c>=n: print("true") else: print("false")