added a few dictionary examples

master
manetta 4 years ago
parent ee301dfc97
commit e40474f84a

@ -646,7 +646,11 @@
"outputs": [],
"source": [
"# Make an empty dictionary\n",
"dict = {}"
"d = {}\n",
"\n",
"# or\n",
"\n",
"d = dict()"
]
},
{
@ -655,8 +659,8 @@
"metadata": {},
"outputs": [],
"source": [
"dict['word'] = 10 \n",
"print(dict)"
"d['word'] = 10 \n",
"print(d)"
]
},
{
@ -665,7 +669,7 @@
"metadata": {},
"outputs": [],
"source": [
"dict.keys()"
"d.keys()"
]
},
{

Loading…
Cancel
Save