ord python
# The ord() function returns an integer representing the Unicode character.
res = ord('A')
print(res)
# output 65
ord python
# The ord() function returns an integer representing the Unicode character.
res = ord('A')
print(res)
# output 65
ord python3
# ord('a') means 'get unicode of a'
ord('a') = 97
# chr(97) is the reverse, and means 'get ascii of 97'
chr(97) = 'a'
# to get the int val of a single digit represented as a char, do the following:
# ord(single_digit_char) - ord('0') = single_digit_int
ord('5') - ord('0') = 5
ord('3') - ord('0') = 3
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us