Created
March 17, 2014 12:59
-
-
Save stevesbrain/9598749 to your computer and use it in GitHub Desktop.
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
#Demonstrate setting of array with keys + values | |
data= {} | |
(data['how'], data['amount'], data['description'], data['paid_to']) = ("From Net Financed Proceeds", 55.0, "Paper fees", "John") | |
#Demonstrate printing values based on looking up keys - i.e., array['key'] = display value associated with key | |
print("How: " + data['how']) | |
print("Amount: " + str(data['amount'])) | |
print("Description: " + data['description']) | |
print("Paid to: " + data['paid_to']) | |
#Showcase entry of new data for 'how' key overwriting previous value | |
data['how'] = ("new data") | |
print(data['how']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment