Updated explanations and tips
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
"source": [
|
||||
"## First: if you need a refresher on the foundations\n",
|
||||
"\n",
|
||||
"I'm going to defer to an AI friend for this, because these explanations are so well written with great examples. Copy and paste the code examples into a new cell to give them a try.\n",
|
||||
"I'm going to defer to an AI friend for this, because these explanations are so well written with great examples. Copy and paste the code examples into a new cell to give them a try. Pick whichever section(s) you'd like to brush up on.\n",
|
||||
"\n",
|
||||
"**Python imports:** \n",
|
||||
"https://chatgpt.com/share/672f9f31-8114-8012-be09-29ef0d0140fb\n",
|
||||
@@ -40,8 +40,14 @@
|
||||
"**Python lists, dicts and sets**, including the `get()` method: \n",
|
||||
"https://chatgpt.com/share/672fa225-3f04-8012-91af-f9c95287da8d\n",
|
||||
"\n",
|
||||
"**Python files** including modes, encoding, context managers, Path, glob.glob: \n",
|
||||
"https://chatgpt.com/share/673b53b2-6d5c-8012-a344-221056c2f960\n",
|
||||
"\n",
|
||||
"**Python classes:** \n",
|
||||
"https://chatgpt.com/share/672fa07a-1014-8012-b2ea-6dc679552715"
|
||||
"https://chatgpt.com/share/672fa07a-1014-8012-b2ea-6dc679552715\n",
|
||||
"\n",
|
||||
"**Pickling Python objects and converting to JSON:** \n",
|
||||
"https://chatgpt.com/share/673b553e-9d0c-8012-9919-f3bb5aa23e31"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -123,7 +129,7 @@
|
||||
"source": [
|
||||
"# But you may not know that you can do this to create dictionaries, too:\n",
|
||||
"\n",
|
||||
"fruit_mapping = {fruit:fruit.upper() for fruit in fruits}\n",
|
||||
"fruit_mapping = {fruit: fruit.upper() for fruit in fruits}\n",
|
||||
"fruit_mapping"
|
||||
]
|
||||
},
|
||||
@@ -147,7 +153,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"fruit_mapping_unless_starts_with_a = {fruit:fruit.upper() for fruit in fruits if not fruit.startswith('A')}\n",
|
||||
"fruit_mapping_unless_starts_with_a = {fruit: fruit.upper() for fruit in fruits if not fruit.startswith('A')}\n",
|
||||
"fruit_mapping_unless_starts_with_a"
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user