I am working on Python and I have defined a Parent class as follows
class Country:
"""Models countries"""
def __init__(self, name, population, continent, zone):
"""Initiates the Country class"""
self.na = name
self.co = continent
self.zo = zone
self.po = population
I have also defined two method in this class. I have created a subclass named Europe_country in which I want to set default value of continent and zone to 'Europe' and 'Temperate' respectively.
I have tried to do it like this
class Europe_country(Country):
"""Models European countries specifically"""
co = 'Europe'
zo = 'Temperate'
europe_1 = Europe_country('Abc', 999)
But obviously I am wrong. I am unable to find a solution for this problem on the internet. Please help.