daily pastebin goal
9%
SHARE
TWEET

Untitled

a guest Mar 22nd, 2019 66 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. alphabet = "яабвгдеёжзийклмнопрстуфхцчшщъыьэю"
  2.  
  3. def sub(s1, s2):
  4.     i = 0
  5.     result = ""
  6.     while i < len(s1):
  7.         code = alphabet.index(s1[i]) - alphabet.index(s2[i])
  8.         if code < 0:
  9.             code = code + 33
  10.         result += alphabet[code]
  11.         i += 1
  12.     return result
  13.  
  14. if __name__ == '__main__':
  15.     first = "ёлисувшоюцомювызпэъмо"
  16.     second = "ъэлвшреээтжщюигвфбсцх"
  17.     third = "жъыхйтсжыашшьямышзьвг"
  18.  
  19.     k_ch = sub(second, first)
  20.     plain = sub(third, k_ch)
  21.     print(plain)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top