# Class  in Python

## how to track the HP of all characters? ##
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1659451521768/s2_riE-9R.png align="left")

> It's better to make each character has its own HP. This is where Class comes in handy.

```
class Monster():
    hp = 100
    mp = 10

    def damage(self, attack):
        self.hp = self.hp - attack

monster1 = Monster()
monster1.damage(120)

monster2 = Monster()
monster2.damage(90)
```

