Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
3 views
in Python by (16.4k points)

Official python documents explains ord(c) as:

ord(c):

Given a string representing one Unicode character, return an integer representing the Unicode code point of that character. For example, ord('a') returns the integer 97 and ord('€') (Euro sign) returns 8364. This is the inverse of chr().

But, it's not specifying the actual meaning of ord. Can anyone please help me?

1 Answer

0 votes
by (26.4k points)

It actually stands for ordinal.

The most punctual utilization of ord that I recollect was in Pascal. There, ord() restored the ordinal value of its argument. For characters, this was characterized as the ASCII code. 

Afterward, Python (just as PHP, a few lingos of SQL, and so on) followed this show, then again, actually nowadays they're bound to utilize Unicode as opposed to ASCII. 

It could be that the origin of the term returns farther than Pascal.

Want to learn python to get expertise in the concepts of python? Join python certification course and get certified

Related questions

0 votes
4 answers
0 votes
1 answer
asked Aug 7, 2019 in Java by Nigam (4k points)
0 votes
1 answer
asked Sep 27, 2019 in Python by Sammy (47.6k points)
0 votes
1 answer
...