Advertisement
Nenogzar

Untitled

Jan 12th, 2024
960
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.38 KB | None | 0 0
  1. # Вземаме вход от потребителя
  2. words = input("Въведете думи, разделени със запетая: ").split(", ")
  3.  
  4. # Изчисляваме дължината на всяка дума и формираме нов низ
  5. result = ", ".join([f"{word} -> {len(word)}" for word in words])
  6.  
  7. # Извеждаме резултата
  8. print(result)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement