Advertisement
pacho_the_python

Untitled

Feb 17th, 2022
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. code = input().split(" ")
  2. decoded_string = []
  3. for i in code:
  4.     word_list = list(i)
  5.     num = ""
  6.     while word_list[0] in "1234567890":
  7.         num += word_list[0]
  8.         word_list.pop(0)
  9.     num_to_str = chr(int(num))
  10.     word_list.insert(0, num_to_str)
  11.  
  12.     word_list[1], word_list[-1] = word_list[-1], word_list[1]
  13.     decoded_string += ["".join(word_list)]
  14. for j in decoded_string:
  15.     print(j, end=" ")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement