Two newbie questions

Manus Hand mjhand at concentric.net
Tue Jun 13 15:28:21 EDT 2000


Following my own post.  How gauche.

Anyway, a slightly more legible alternative to get a random number
between -sys.maxint and sys.maxint:

import random
yourNumber = random.randrange(sys.maxint) * random.choice([1, -1])

Manus





More information about the Python-list mailing list