fork download
  1. def DeslocaASCII(texto):
  2. novoTexto = ''
  3. for letra in texto:
  4. numero = ord(letra)
  5. novoTexto += chr(numero + (-23 if numero > 87 else 3))
  6. return novoTexto
  7.  
  8. print(DeslocaASCII('ABCDEFGHIJKLMNOPQRSTUVWXYZ'))
  9.  
  10. #https://pt.stackoverflow.com/q/253730/101
Success #stdin #stdout 0.03s 27704KB
stdin
Standard input is empty
stdout
DEFGHIJKLMNOPQRSTUVWXYZABC