Write a Python program that accepts a comma separated sequence of words as input and prints the unique words in sorted form (alphanumerically).

  • برمجة
  • برمجة بايثون

Write a Python program that accepts a comma separated sequence of words as input and prints the unique words in sorted form (alphanumerically).

الأجوبة

items = input("Input comma separated sequence of words")
words = [word for word in items.split(",")]
print(",".join(sorted(list(set(words)))))
هل كان المحتوى مفيد؟

تبحث عن مدرس اونلاين؟

محتاج مساعدة باختيار المدرس الافضل؟ تواصل مع فريقنا الان لمساعدتك بتأمين افضل مدرس
ماهو التخصص الذي تبحث عنه؟
اكتب هنا...