Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does anyone know the word that built-in function ord() abbreviate for?

python has a built-in function ord(), I think it must be a anbbreviation. Just like another built-in function chr(), which is an abbreviation of the word "character". Does anyone know the word that built-in function ord() abbreviate for?

like image 817
arnkore Avatar asked Dec 10 '11 01:12

arnkore


People also ask

What does ORD () stand for?

It stands for "ordinal". The earliest use of ord that I remember was in Pascal. There, ord() returned the ordinal value of its argument.

What does ORD () mean in Python?

Python ord() Function The ord() function returns the number representing the unicode code of a specified character.

What is CHR () and Ord () in Python?

The Python ord() function converts a character into an integer that represents the Unicode code of the character. Similarly, the chr() function converts a Unicode code character into the corresponding string.

What is opposite of Ord in Python?

Python ord() and chr() are built-in functions. They are used to convert a character to an int and vice versa. Python ord() and chr() functions are exactly opposite of each other.


1 Answers

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.

like image 125
Ernest Friedman-Hill Avatar answered Sep 26 '22 09:09

Ernest Friedman-Hill