Newbie Req: Integer Handling

Aesop me at my.own.computer
Sun Mar 19 19:48:30 EST 2000


Howdy,
    Been looking for an alternative way to handle integers, such that say in
a 3 digit number, any digit making up the number can be examined
individually. Up until now been converting the integers to strings, then
handling the strings, then converting back to numbers if the need be... long
and laborious.

What other ways are there of handling such issues? the need is for a
crossword puzzle based around mathematical clues. Such that the second digit
of one answer may be the first digit of another answer. Or whatever.

is it possible to set up direct pointers and indirection operators as in C
that could be used to examine integer variables on the fly?

as in;
int x = 1, y = 2, z[10];
int *ip;

ip= &x;          /* ip points to x */
y= *ip;           /* y = 1 */
*ip = 0;         /* x = 0 */
ip = &z[0];    /* ip now points to z[0] */

can this sort of thing be done in Python?

Yours In Zeros and Ones,
        Ambrose. S





More information about the Python-list mailing list