The name about sums it up, thanks guys. (Just to make it more specific I'm programming stats and I want to have a certain chance that a stat will raise every time you level up)
You can use random to get a random value between 0 and 1, and compare it to 0,2. Like this:
import random
if random.random() < 0.2:
do_something()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With