Quick actions

cmd+k|ctrl+k

Navigation

Languages

Print duplicates letter in list

Snippet info

Language

Python

Visibility

public

Author

dharmendrarah

Created

2023-01-10T10:34:58.184475Z

Updated

2023-01-10T10:34:58.184475Z


some_list=['a','b','c','b','d','m','n','n']

empty_list=[]
 
for value in some_list:
    if some_list.count(value)>1:
        if value not in empty_list:
            empty_list.append(value)
        
    
print(empty_list)
        
INFO