Random 32Bit integer was: Size of integers (2**32-1)

Paul Rubin phr-n2002a at nightsong.com
Tue Feb 5 16:42:04 EST 2002


Thomas Guettler <st-newsgroups at thomas-guettler.de> writes:
> This would give me a long. But I need a 32Bit Integer.
> Unfortunately there is no sys.minint.
> 
> OK, it is not that important for me. But it would be nice to know
> the answer (How to get a radom 32 Bit integer)

The largest 32-bit integer (sys.maxint on a 32 bit system) is 2**31-1.
The smallest integer is -(2**31).



More information about the Python-list mailing list