title: Python,unable to call initial arguments outside the class
body: <p>The below python class have empty dictionary as initial arguments, after calling 
  <code>createAccount()</code> outside class it successfully add data to dictionary but I can't access dictionary outside class.</p>
  
  <p>What changes shall I make in the below code to access the newly created account details  ?</p>
  
  <p>*Please note that my error occurs in the last line of the code *</p>
  
  <pre><code>class SavingsAccount():
      def __init__(self):
          self.savingsAccounts = {}
      def createAccount(self, name, initialDeposit):
          print()
          self.accountNumber = int(12345)
          self.savingsAccounts[self.accountNumber] = [name, initialDeposit]
          print("Account creation has been successful. Your account number is ", self.accountNumber)
  
  
  SavingsAccount().createAccount(name = 'a',initialDeposit=4)
  
  print(SavingsAccount().savingsAccounts[12345]) # getting error here
  </code></pre>