'Random, but with a specific percentage Python

Is it possible to do something random but with a certain percentage in Python? Random, but with a specific percentage



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source