Advertisement
Toxotsist

Task 8 py

Apr 30th, 2022
892
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. from pprint import pprint
  2.  
  3.  
  4. def main(text):
  5.     text = text.replace("\n", '')
  6.     text = text.replace(' ', '')
  7.     text = text.replace('<:', '')
  8.     text = text.replace(':>', '')
  9.     text = text.replace(';', '')
  10.     text = text.replace('=:', '♂')
  11.     text = text.split("glob`")
  12.     text = text[1:]
  13.     result = {}
  14.     for i in range(len(text)):
  15.         text[i] = text[i].split("♂")
  16.     result = {text[i][1]: text[i][0] for i in range(len(text))}
  17.     return result
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement