Wednesday, February 24, 2016

Ordinal Numbers

In set theory, an ordinal number (or ordinal) is one generalization of the concept of a natural number. With the natural numbers in increasing order {0, 1, 2, …}, each number counts the number of natural numbers that precede it. The ordinals extend this concept beyond the natural numbers by having each ordinal represent the set of all ordinals that are less than it. For instance, the ordinal 2 represents the set {0, 1} and the smallest infinite ordinal, written ω, represents the set of all natural numbers, {0, 1, 2, …}. Some ordinals, like 2, are successor ordinals by virtue of having an immediate predecessor.

Detailed Reading :
https://en.wikipedia.org/wiki/Ordinal_number

What it means to programming
--------------------------------------
Check "man ascii" on linux

>>> ord('$')
36
>>> ord('A')
65
>>> symbols='$¢£¥€¤'
>>> codes = [ord(symbol) for symbol in symbols]
>>> codes
[36, 162, 163, 165, 8364, 164]


No comments: