write a python program to find the elements of a list which occur more than twice in a list.
Answers
Answered by
11
Source code:
n = int(input("Enter the number of elements you'd like to enter: "))
l = list()
for i in range(n):
x = eval(input("Enter the element: "))
l.append(x)
print()
print(l, "is your given list.")
print()
rl = list()
for i in l:
if l.count(i) > 2:
rl.append(i)
print(rl, "is the list of elements that occur more than twice.")
Similar questions