if the child class adds some new variablesit can call the parent class' constructor as demonstrated below another use is if the child class just wants to add on to one of the parent' methods in the example belowthe child' print_var method calls the parent' print_var method and adds an additional line class parentdef __init__(selfa)self def print_var(self)print("the value of this class ' variables are:"print(self aclass child(parent)def __init__(selfab)parent __init__(selfaself def print_var(self)parent print_var(selfprint(self bnote you can also inherit from python built-in typeslike strings (strand lists (list)as well as any classes defined in the various modules that come with python note your code can inherit from more than one class at timethough this can be little tricky playing-card example in this section we will show how to design program with classes we will create simple hi-lo card game where the user is given card and they have to say if the next card will be higher or lower than it this game could easily be done without classesbut we will create classes to represent card and deck of cardsand these classes can be reused in other card games we start with class for playing card the data associated with card consists of its value ( through and its suit the card class below has only one method__str__ this is special method thatamong other thingstells the print function how to print card object class carddef __init__(selfvaluesuit)self value value self suit suit def __str__(self)names 'jack ''queen ''king ''ace 'if self value <