Skip to content

Commit

Permalink
some trimming
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Jan 31, 2024
1 parent 0286431 commit 591a79c
Showing 1 changed file with 1 addition and 60 deletions.
61 changes: 1 addition & 60 deletions content/01-python/w2-python-advanced-datatypes.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -201,36 +201,6 @@
"a"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Note that lists can even contain other lists:"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"[-1, ['other list', 3], -2.0, 'my list', 4]"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"a[1] = [\"other list\", 3]\n",
"a"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -803,35 +773,6 @@
"squares"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"here we use another python type, the tuple, to combine numbers from two lists into a pair"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"[(1, 3), (1, 4), (2, 3), (2, 1), (2, 4), (3, 1), (3, 4)]"
]
},
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"[(x, y) for x in [1,2,3] for y in [3,1,4] if x != y]"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -1089,7 +1030,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.6"
"version": "3.12.1"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 591a79c

Please sign in to comment.