Problem scenario
You have a program as follows:
class Location:
def __init__(self, country=”US”, state=”CA”, city=”Los Angeles”):
self.country = country
self.state = state
self.city = city
def printer(self):
return [self.country, self.state, self.city]
new_loc = Location(“Mexico”, “Mexico City”, “Mexico City”, “good neighborhood”)
print(new_loc.printer())
Here are your choices of what it could print out:
a. TypeError: init() takes from 1 to 4 positional arguments but 5 were given
b.
…