randomly choose between two numbers python

 import random
 random.choice([-40, 40])

Here is what the above code is Doing:
1. We import the random module.
2. We use random.choice() to choose a random element from a list.
3. We pass in a list of integers.
4. We print the result.