Skip to content

Instantly share code, notes, and snippets.

@vubon
Created September 14, 2019 14:04
Show Gist options
  • Save vubon/99d4acc564e4a80da98b3bfd30c4bd84 to your computer and use it in GitHub Desktop.
Save vubon/99d4acc564e4a80da98b3bfd30c4bd84 to your computer and use it in GitHub Desktop.
Python Property function part 2
# Fund transfer process
account.balance = account.balance - 500.25
# Now call the account_information attribute
print("Calling the account_information attribute")
print(f"Account information: {account.account_information}")
# calling the balance attribute
print(f"Current balance: {account.balance}")
# Output
# Calling the account_information attribute
# Account information: {'bank_account': '0004-0067894712', 'balance': 1000.5}
# Current balance: 500.25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment