how to use random with a negative number in python code example
Example: get random number positive or negative python
import random
return 1 if random.random() < 0.5 else -1
import random
return 1 if random.random() < 0.5 else -1