Answers for "how do i find duplicated in a python"

2

how to find duplicate numbers in list in python

l=[1,2,3,4,5,2,3,4,7,9,5]
l1=[]
for i in l:
    if i not in l1:
        l1.append(i)
    else:
        print(i,end=' ')
Posted by: Guest on June-06-2021
0

python find duplicates in string

from collections import Counter

def do_find_duplicates(x):
    x =input("Enter a word = ")
    for key,val in Counter(x).items():
        print(key,val)
Posted by: Guest on April-17-2021

Code answers related to "how do i find duplicated in a python"

Python Answers by Framework

Browse Popular Code Answers by Language