Skip to content

Commit ef43ffb

Browse files
committed
Adding indexing concept in list
1 parent acf3ade commit ef43ffb

File tree

1 file changed

+34
-7
lines changed

1 file changed

+34
-7
lines changed

Chapter02/Exercise21/Exercise21.ipynb

+34-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": 1,
5+
"execution_count": 2,
66
"metadata": {},
77
"outputs": [
88
{
@@ -20,7 +20,7 @@
2020
},
2121
{
2222
"cell_type": "code",
23-
"execution_count": 2,
23+
"execution_count": 3,
2424
"metadata": {},
2525
"outputs": [
2626
{
@@ -40,7 +40,7 @@
4040
},
4141
{
4242
"cell_type": "code",
43-
"execution_count": 3,
43+
"execution_count": 4,
4444
"metadata": {},
4545
"outputs": [
4646
{
@@ -58,10 +58,37 @@
5858
},
5959
{
6060
"cell_type": "code",
61-
"execution_count": null,
61+
"execution_count": 6,
6262
"metadata": {},
63-
"outputs": [],
64-
"source": []
63+
"outputs": [
64+
{
65+
"name": "stdout",
66+
"output_type": "stream",
67+
"text": [
68+
"365\n"
69+
]
70+
}
71+
],
72+
"source": [
73+
"print(mixed[0])"
74+
]
75+
},
76+
{
77+
"cell_type": "code",
78+
"execution_count": 7,
79+
"metadata": {},
80+
"outputs": [
81+
{
82+
"name": "stdout",
83+
"output_type": "stream",
84+
"text": [
85+
"[365, 'days', True]\n"
86+
]
87+
}
88+
],
89+
"source": [
90+
"print(mixed[0:3])"
91+
]
6592
}
6693
],
6794
"metadata": {
@@ -80,7 +107,7 @@
80107
"name": "python",
81108
"nbconvert_exporter": "python",
82109
"pygments_lexer": "ipython3",
83-
"version": "3.7.3"
110+
"version": "3.7.4"
84111
}
85112
},
86113
"nbformat": 4,

0 commit comments

Comments
 (0)