Skip to content

Commit 5966ab6

Browse files
committed
Check Dict
1 parent 57fa357 commit 5966ab6

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Dictionaries.ipynb

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,29 @@
221221
" print(x, y)"
222222
]
223223
},
224+
{
225+
"cell_type": "code",
226+
"execution_count": 13,
227+
"metadata": {},
228+
"outputs": [
229+
{
230+
"name": "stdout",
231+
"output_type": "stream",
232+
"text": [
233+
"Yes, 'model' is one of the keys in the thisdict dictionary\n"
234+
]
235+
}
236+
],
237+
"source": [
238+
"thisdict = {\n",
239+
" \"brand\": \"Ford\",\n",
240+
" \"model\": \"Mustang\",\n",
241+
" \"year\": 1964\n",
242+
"}\n",
243+
"if \"model\" in thisdict:\n",
244+
" print(\"Yes, 'model' is one of the keys in the thisdict dictionary\")"
245+
]
246+
},
224247
{
225248
"cell_type": "code",
226249
"execution_count": null,

0 commit comments

Comments
 (0)