Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

eval function in python

#eval()
z=eval(input("enter the list:"))
n=int(input("enter the list to search:"))
freq=z.count(n)
if freq>0:
    print(n,"occurs",freq,"times")
else:
    print(n,"does not occur")
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #eval #function #python
ADD COMMENT
Topic
Name
8+8 =