Created
September 14, 2019 14:04
-
-
Save vubon/99d4acc564e4a80da98b3bfd30c4bd84 to your computer and use it in GitHub Desktop.
Python Property function part 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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