You can find online tutorials such as this that explain how to create classes and functions.
Here's a simple example:
class Warrior:
def __init__(self, name, health):
self.name = name
self.health = health
def display(self):
print(f"The warrior {self.name} has {self.health} HP.")
spartacus = Warrior("Spartacus", 100)
spartacus.display()
Please, share your existing code or add more details to your question for a more specific answer.