Blog Archive

search

Tuesday, August 6, 2019

Python program that accepts a comma separated sequence of words as input and prints the unique words in sorted form

a = input('Input comma separated sequence of words ')
words = [word for word in a.split(",")]
print(",".join(sorted(list(set(words)))))

No comments:

Post a Comment

Python program to create a string from two given strings concatenating uncommon characters of the said strings

PROGRAM :  a = input('Enter a string : ') b = input('Enter a string : ') c='' for i in a:     if(i not in b):...