keerthi neeraj
keerthi neeraj

Reputation: 1

What is the meaning of ord in ord() function in Python?

ord() is used to get the ASCII value of the character we insert.

Like ord("A") => 65

Does anyone know what ord stands for?

Is it ordinal or something else?

Upvotes: -1

Views: 503

Answers (2)

krock
krock

Reputation: 29629

From the python docs for ord()

Given a string representing one Unicode character, return an integer representing the Unicode code point of that character... This is the inverse of chr().

So ord() will return the integer that represents a single character that is passed to it.

Upvotes: 0

Dominique
Dominique

Reputation: 17565

It stands for ASCII code, which is a code for the most general characters, like letters, digits, point, comma, ...

More information can be found on Wikipedia.

Upvotes: 0

Related Questions