charcodeat python
def charcodeat(string,index):
if isinstance(string,str) and isinstance(index,int):
return ord(string[index])
else:
raise Exception(f"Error: charcodeat takes a str and an int, received {type(string)} and {type(int)}."
charcodeat python
def charcodeat(string,index):
if isinstance(string,str) and isinstance(index,int):
return ord(string[index])
else:
raise Exception(f"Error: charcodeat takes a str and an int, received {type(string)} and {type(int)}."
python show charracter code
>>> ord('a')
97
>>> chr(97)
'a'
>>> chr(ord('a') + 3)
'd'
>>>
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