class Account:
def __init__(self, account_name, account_bal = 0):
self.account_name = account_name
self.account_balance = account_balance
def deposit(self, amount):
self.account_balance += amount
First_account = Account('Adex')
Second_account = Account('Bob')
Now my question is;
How can I put both First_account
and Second_account
into another single object let’s say All_account
Like:
All_account.First_account.deposit
All_account.Second_account.deposit
Pls I need help irrespective of the structure of the code.
Thanks