Use os.urandom instead of random.randrange.