News

How to use functions in classes in Python. ... In the following example, we create a static method to generate a random number, then we subtract this amount from the enemy’s health.