Skip to content

Instantly share code, notes, and snippets.

@stevesbrain
Created March 17, 2014 12:59
Show Gist options
  • Save stevesbrain/9598749 to your computer and use it in GitHub Desktop.
Save stevesbrain/9598749 to your computer and use it in GitHub Desktop.
#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