list=['A', 'R', 'I','J','I','T','T']
def reccuring():
count=0
list1=[]
for i in list:
if list.count(i)>1:
list1.append(i)
return list1
reccuring()
OutPut
['I', 'I', 'T', 'T']
I am getting the recurring elements as many times as present in the list. What modification do I have to do to get the recurring elements only once?
Thank You