Computer Science, asked by utkarshchandel1988, 8 months ago

Write a code to find the frequencies of all elements in a list . Print the list of unique elements in the list and duplicate elements in a list .​

Answers

Answered by sihagritu9
3

Answer:

Mine language is python.

Explanation:

s=eval(input ("enter a list:"))

unique=[ ]

duplicate=[ ]

l=0

ln=len(s)

for i in range (0,ln):

m=index (i)

for j in range s.pop(m):

if s[i]=s[j]:

if j is not in duplicate:

m+=1

duplicate.append(j)

print (j,m,"times")

if m ==0:

unique.append(j)

print ("unique list:", unique)

print ("duplicate list", duplicate)

Similar questions