Q. Write a Python program to remove duplicate characters of a given string.
Answer =
string = input("Enter a string :- ")
new_str = ""
for i in string:
if i not in new_str :
new_str += i
print(new_str)
Output :-
Enter a string :- Pathwalla
Pathwl
>>>
Enter a string :- Portal Express
Portal Expes
>>>
Can you please share an example output
ReplyDeleteYes, why not 😊
DeleteThanks a lot....yours efforts are really appreciable :)
ReplyDeleteWelcome : )
DeletePost a Comment
You can help us by Clicking on ads. ^_^
Please do not send spam comment : )