Advertisement
Guest User

05. Emoticon Finder

a guest
Jul 16th, 2020
442
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. text = input()
  2. for i in range(len(text)):
  3.     if text[i] == ':':
  4.         print(f":{text[i + 1]}")
  5.  
  6. # цикъла е елементарен и може да се направи с comprehension.
  7. # [print(f":{text[i + 1]}") for i in range(len(text)) if text[i] == ':']
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement