Created
December 10, 2018 16:16
-
-
Save parzibyte/087b099eaedf09ed6136b7ffb339b072 to your computer and use it in GitHub Desktop.
LetrasAAscii created by parzibyte - https://repl.it/@parzibyte/LetrasAAscii
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Letras a código ASCII | |
@author parzibyte | |
""" | |
cadena = "Soy un mensaje" | |
codificado = [] | |
for letra in cadena: | |
codificado.append(ord(letra)) | |
print("El mensaje '{}' se convierte en {}".format(cadena, codificado)) | |
# El mensaje 'Soy un mensaje' se convierte en [83, 111, 121, 32, 117, 110, 32, 109, 101, 110, 115, 97, 106, 101] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment