New python learner here, when i was watching some tutorials i stumbled upon a code like this:
from character import *
class enemy(Character):
def __init__(self, name, hp, str)
Character.__init__(self, name, hp)
What exactly does the following code do in this case? First time seeing multiple _init _in a single class and i can't seem to understand this type of code.
Character.__init__(self, name, hp)
the character file code is here:
class Character(object):
def __init__(self, name, hp):
self.name = name
self.hp = hp
def attack(self,other):
pass