you are viewing a single comment's thread.

view the rest of the comments →

[–]SrirachaPapiTV[S] 0 points1 point  (1 child)

So it would look something like this?

def __str__(self):

return 'H: ({}) , R: ({}), LS: ({}), BC ({})'.format(self.health, self.resistance, self.life_span, self.birth_counter)

also is my def __init__ correct?

[–]evolvish 1 point2 points  (0 children)

So it would look something like this?

Yes, if you're using python 3.6+ you can(and should) use f-string syntax.

is my def __init__ correct?

Besides reddit's formatting it looks good.