Write a python program to find the frequency of all the elements of a list and also to print the list of unique and duplicate elements of the given list.
CODE FOR THE ABOVE PYTHON PROGRAM :
WRITTEN CODE FOR THE ABOVE PROGRAM :
lst = eval(input(" ENTER LIST : "))
length = len(lst)
uniq = []
dupl = []
count = i = 0
while i < length:
element = lst[i]
count = 1
if element not in uniq and element not in dupl:
i+=1
for j in range(i, length):
if element==lst[j]:
count+=1
else:
print("Element",element,"Frequency",count)
if count==1:
uniq.append(element)
else:
dupl.append(element)
else:
i+=1
print("ORIGINAL LIST : ",lst)
print("UNIQUE ELEMENTS LIST : ",uniq)
print("DUPLICATE ELEMENTS LIST : ",dupl)
OUTPUT :