Last active
December 12, 2020 14:19
-
-
Save marcuxyz/b394916747f9330f2b060bd0b32d584e to your computer and use it in GitHub Desktop.
char to int
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
num = (input("\nEntre com um numero entre 1 e 27 : ")) | |
result = [ord(c) for c in num] | |
print(result) | |
# com while | |
result = [] | |
while True: | |
c = (input("\nEntre com um numero entre 1 e 27 : ")) | |
if not c: | |
break | |
result.append(ord(c)) | |
print(result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment