The input will contain a list of food items where each occurrence of an item represents one vote. You should print the winning food item as output. If there is no clear winner, print "NOTA".
Sample Input:
["pasta","pasta","pasta","pasta","pasta","paratha","paratha","paratha"]
Sample Output:
pasta
import ast,sys
input_str = sys.stdin.read()
votes = ast.literal_eval(input_str)
d = {}
for i in votes:
if i not in d:
d[i]=1
else:
d[i] = d[i] + 1
for key, value in d.items():
if value == max(d.values()):
print("{}".format(key))