Posts by Gabriel Cavalcante • 21 points
1 post
-
2
votes1
answer39
viewsQ: How do I access an attribute(which is a list) of a class by a method outside that class in python?
I have a Shop class that one of her attributes is a list (self.products = [ ]). class Loja(Empresa): def __init__(self, nome, cnpj, razao_social): super().__init__(nome, cnpj) self._razao_social =…