Skip to content

Instantly share code, notes, and snippets.

@marcuxyz
Last active December 12, 2020 14:19
Show Gist options
  • Save marcuxyz/b394916747f9330f2b060bd0b32d584e to your computer and use it in GitHub Desktop.
Save marcuxyz/b394916747f9330f2b060bd0b32d584e to your computer and use it in GitHub Desktop.
char to int
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