Comment puis-je convertir un caractère à un entier en Python, et vice versa?
-
22-08-2019 - |
Question
Je veux obtenir, étant donné un caractère, sa valeur ASCII
.
Par exemple, pour le a
de caractère, je veux 97
, et vice versa.
Autres conseils
>>> ord('a')
97
>>> chr(97)
'a'
ord et chr
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow