Skip to content

Instantly share code, notes, and snippets.

@sarum9in
Created November 8, 2014 17:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sarum9in/2cbadd8c196cd1ada875 to your computer and use it in GitHub Desktop.
Save sarum9in/2cbadd8c196cd1ada875 to your computer and use it in GitHub Desktop.
#!/usr/bin/python3
a = 'абвгдеёжзийклмнопрстуфхцчшщъыьэюя'
s = 'бяэ иыюшт плйэ олявпозлал ъкуёзилмвбёфвозлал оиляэнь ялищхлал'
for shift in range(len(a)):
for c in s:
if c in a:
x = a.index(c)
y = (x + shift) % len(a)
print(a[y], end='')
else:
print(c, end='')
print()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment