Some thougts on cartesian products
kay.schluehr at gmx.net
Mon Jan 23 15:30:01 EST 2006
Bryan Olson wrote:
> There's no such thing; you'd have to define it first. Are duplicates
> significant? Order?
That's all trivial isn't it? A string is a set of pairs (i,c) where i
is an integer number, the index, with 0<=i<j<=card(string)-1, for
(i,c), (j,d) in string and c is a character. Since there is a natural
order on integer numbers we can induce this order on the string, so
that it is an ordered set. For representation purposes we can omit i
since i is simply the position of c in the sequence. Same holds for
lists, tuples or other sequences.
More information about the Python-list