Python Program to Remove all duplicates from a given string


str = input ("Enter string")

len1= len(str)

x=''

for i in range (len1):

    ch = str[i]

    if (str.count(ch)==1):

        x+=ch

print('String after removal of duplicates: ',x)

Comments

Some popular posts

Python Program that computes the net amount of a bank account based a transaction log from console input.