python has a built-in function ord(). Just like another built-in function chr(), which is an abbreviation of the word “character”. The word that built-in function ord() abbreviate for"ordinal".It’s an abbreviation for “ordinal”. Ordinal numbers are counting numbers – i.e., 1, 2, 3. ord()converts the character into its (countable) position in the character set.
原文链接:https://blog.csdn.net/pilifeng1/article/details/81980103