Python Random on percentage?
Hello, I plan to program something in Python but I can't find anything about it on the Internet.
How can I use the random module to select an element by percentage?
For example, with Pokemon there is a certain probability that a certain Pokemon will appear.
How do I best do this?
The random module has some useful helpers:
https://docs.python.org/3/library/random.html#random.choices
https://www.delftstack.com/en/howto/python/python-weighted-random/