Skip to content

Instantly share code, notes, and snippets.

@nuit
Last active August 29, 2015 13:56
Show Gist options
  • Save nuit/9262400 to your computer and use it in GitHub Desktop.
Save nuit/9262400 to your computer and use it in GitHub Desktop.
Bastão de Licurgo
d = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z']
input = raw_input('>> ')
texto = input.replace(' ','').upper()
if len(texto)>28:
sys.exit()
if len(texto)<2:
sys.exit()
else:
t = len(texto)
a = list(texto)[0:t]
x = 28-t
y = a+d[:x]
d = zip(y,y[7:],y[14:],y[21:])
a = [''.join(x) for x in d]
print str(a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment