├── ANN_weights
├── ANN n17.data-00000-of-00001
├── ANN n17.index
├── ANN n38.data-00000-of-00001
├── ANN n38.index
├── ANN n66.data-00000-of-00001
└── ANN n66.index
├── Chapter_01_Basics_of_Python.ipynb
├── Chapter_02_Python_for_DataSciences.ipynb
├── Chapter_03_Data.ipynb
├── Chapter_04_Features_Engineering.ipynb
├── Chapter_05_Deep_Neural_Network.ipynb
├── Chapter_06_Vectorized_Backtesting.ipynb
├── Chapter_07_Recurrent_Neural_Network.ipynb
├── Chapter_08_ANN_reg_app.ipynb
├── Chapter_08_RNN_cl_app.ipynb
├── Extract_Chapter_11.pdf
├── Extract_Chapter_12.pdf
├── FOREX + CRYPTO
├── AUDCAD_D1.csv
├── AUDUSD_D1.csv
├── BTCUSD_D1.csv
├── ETCUSD_D1.csv
├── ETHUSD_D1.csv
├── EURGBP_D1.csv
├── EURUSD_D1.csv
├── GBPUSD_D1.csv
├── LTCUSD_D1.csv
├── USDCAD_D1.csv
├── USDCHF_D1.csv
├── USDCNH_D1.csv
├── USDJPY_D1.csv
└── XMRUSD_D1.csv
├── MT5.py
├── README.md
├── RNN_weights
├── RNN n3.data-00000-of-00001
├── RNN n3.index
├── RNN n31.data-00000-of-00001
├── RNN n31.index
├── RNN n34.data-00000-of-00001
└── RNN n34.index
└── assets.csv
/ANN_weights/ANN n17.data-00000-of-00001:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Quantreo/UDEMY-DEEP-LEARNING-for-algorithmic-trading-using-Python/812b52a12e750a848f7242992ed24a1ba5b31f2e/ANN_weights/ANN n17.data-00000-of-00001
--------------------------------------------------------------------------------
/ANN_weights/ANN n17.index:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Quantreo/UDEMY-DEEP-LEARNING-for-algorithmic-trading-using-Python/812b52a12e750a848f7242992ed24a1ba5b31f2e/ANN_weights/ANN n17.index
--------------------------------------------------------------------------------
/ANN_weights/ANN n38.data-00000-of-00001:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Quantreo/UDEMY-DEEP-LEARNING-for-algorithmic-trading-using-Python/812b52a12e750a848f7242992ed24a1ba5b31f2e/ANN_weights/ANN n38.data-00000-of-00001
--------------------------------------------------------------------------------
/ANN_weights/ANN n38.index:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Quantreo/UDEMY-DEEP-LEARNING-for-algorithmic-trading-using-Python/812b52a12e750a848f7242992ed24a1ba5b31f2e/ANN_weights/ANN n38.index
--------------------------------------------------------------------------------
/ANN_weights/ANN n66.data-00000-of-00001:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Quantreo/UDEMY-DEEP-LEARNING-for-algorithmic-trading-using-Python/812b52a12e750a848f7242992ed24a1ba5b31f2e/ANN_weights/ANN n66.data-00000-of-00001
--------------------------------------------------------------------------------
/ANN_weights/ANN n66.index:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Quantreo/UDEMY-DEEP-LEARNING-for-algorithmic-trading-using-Python/812b52a12e750a848f7242992ed24a1ba5b31f2e/ANN_weights/ANN n66.index
--------------------------------------------------------------------------------
/Chapter_01_Basics_of_Python.ipynb:
--------------------------------------------------------------------------------
1 | {
2 | "nbformat": 4,
3 | "nbformat_minor": 0,
4 | "metadata": {
5 | "colab": {
6 | "name": "EN-TA Chapter 01: Basics of Python.ipynb",
7 | "provenance": [],
8 | "collapsed_sections": [
9 | "nJYyIbZ_WbFT",
10 | "DuY3oXKNWd1h",
11 | "iEQQbsVFWkKi",
12 | "JUULnsP_Xemv",
13 | "cGqtdDyYX1Dk",
14 | "EMAdDk_6YXgw",
15 | "Kd-SYHI-ZF85",
16 | "2UHCKDk8bJEf",
17 | "W9Vc62veaNKg",
18 | "7xKs11J6akHQ",
19 | "wwObVh1w9Wl9",
20 | "-9ElsbKP-xvK",
21 | "emrr2xJjhmKd",
22 | "4NWfx4mRhpgX",
23 | "S0TnQtBMfRXB",
24 | "F8rax_dDgnFI",
25 | "oYh-hMSTB1Ur",
26 | "KE9L44nED-JK",
27 | "Qy6T6HOiGHaN",
28 | "7ilLgwf1HIMw",
29 | "MLRfDnNGHUkI",
30 | "EdYvgavpJPGK",
31 | "xLPPB2NOJUSq",
32 | "XM6mdryCRCAm",
33 | "D5KoCwIFT27I",
34 | "aH-i3Tn3UjJ_",
35 | "C6_cmiswU2AW",
36 | "asuSI8Jg0EaC",
37 | "ppony41B0G1i"
38 | ]
39 | },
40 | "kernelspec": {
41 | "name": "python3",
42 | "display_name": "Python 3"
43 | }
44 | },
45 | "cells": [
46 | {
47 | "cell_type": "markdown",
48 | "metadata": {
49 | "id": "HwIk5lNgltIS"
50 | },
51 | "source": [
52 | "

\n",
53 | "\n",
54 | "\n",
55 | "# PREREQUISITES - **Python basics**\n",
56 | "\n",
57 | "This chapter will give you the python basics you need to follow the rest of the course. These are only reminders of what will be helpful. That's why I advise you to follow free quick Python training for your projects because if you are total strangers to it, it can be hard to do your project.\n",
58 | "\n",
59 | "\n",
60 | "### Part 1: The Python basics\n",
61 | "* Types of objects:\n",
62 | "> * Numbers , Strings, Booleans\n",
63 | "> * Tuples, Lists\n",
64 | "> * Variable assignment\n",
65 | "* Python Structures:\n",
66 | "> * If/Elif/Else\n",
67 | "> * FOR\n",
68 | "> * While\n",
69 | "* The Functions\n",
70 | "> * Basis of functions\n",
71 | "> * Local variable\n",
72 | "> * Global varible\n",
73 | "> * Lambda function\n",
74 | "\n",
75 | "\n",
76 | "\n",
77 | "💰Join our community: https://discord.gg/wXjNPAc5BH\n",
78 | "\n",
79 | "📚Read our book: https://www.amazon.com/gp/product/B09HG18CYL \n",
80 | "\n",
81 | "🖥️Quantreo's YouTube channel: https://www.youtube.com/channel/UCp7jckfiEglNf_Gj62VR0pw\n",
82 | "\n",
83 | "\n",
84 | "\n",
85 | "\n"
86 | ]
87 | },
88 | {
89 | "cell_type": "markdown",
90 | "metadata": {
91 | "id": "nJYyIbZ_WbFT"
92 | },
93 | "source": [
94 | "### Types of objects"
95 | ]
96 | },
97 | {
98 | "cell_type": "markdown",
99 | "metadata": {
100 | "id": "DuY3oXKNWd1h"
101 | },
102 | "source": [
103 | "##### Numbers"
104 | ]
105 | },
106 | {
107 | "cell_type": "code",
108 | "metadata": {
109 | "id": "yoYnGbme8kcq",
110 | "colab": {
111 | "base_uri": "https://localhost:8080/"
112 | },
113 | "outputId": "2d8a9a0e-94c1-4705-8ca8-cf2920544075"
114 | },
115 | "source": [
116 | "# Addition\n",
117 | "6 + 3"
118 | ],
119 | "execution_count": null,
120 | "outputs": [
121 | {
122 | "output_type": "execute_result",
123 | "data": {
124 | "text/plain": [
125 | "9"
126 | ]
127 | },
128 | "metadata": {},
129 | "execution_count": 1
130 | }
131 | ]
132 | },
133 | {
134 | "cell_type": "code",
135 | "metadata": {
136 | "id": "lPQ-ZedRCtL0",
137 | "colab": {
138 | "base_uri": "https://localhost:8080/"
139 | },
140 | "outputId": "584b2b3c-f900-4623-8e1f-7ebd0e1b8c94"
141 | },
142 | "source": [
143 | "# Substraction\n",
144 | "6 - 3"
145 | ],
146 | "execution_count": null,
147 | "outputs": [
148 | {
149 | "output_type": "execute_result",
150 | "data": {
151 | "text/plain": [
152 | "3"
153 | ]
154 | },
155 | "metadata": {},
156 | "execution_count": 2
157 | }
158 | ]
159 | },
160 | {
161 | "cell_type": "code",
162 | "metadata": {
163 | "id": "FSWWYIqBCwlg",
164 | "colab": {
165 | "base_uri": "https://localhost:8080/"
166 | },
167 | "outputId": "9b8cda14-bf9b-4156-eee7-37ec890f074b"
168 | },
169 | "source": [
170 | "# Multiplication\n",
171 | "6 * 3"
172 | ],
173 | "execution_count": null,
174 | "outputs": [
175 | {
176 | "output_type": "execute_result",
177 | "data": {
178 | "text/plain": [
179 | "18"
180 | ]
181 | },
182 | "metadata": {},
183 | "execution_count": 3
184 | }
185 | ]
186 | },
187 | {
188 | "cell_type": "code",
189 | "metadata": {
190 | "id": "fMQNWXVvC0Sx",
191 | "colab": {
192 | "base_uri": "https://localhost:8080/"
193 | },
194 | "outputId": "9ddf66b8-468a-4769-8bc7-87ea658e88f3"
195 | },
196 | "source": [
197 | "# Division \n",
198 | "16 / 3"
199 | ],
200 | "execution_count": null,
201 | "outputs": [
202 | {
203 | "output_type": "execute_result",
204 | "data": {
205 | "text/plain": [
206 | "5.333333333333333"
207 | ]
208 | },
209 | "metadata": {},
210 | "execution_count": 4
211 | }
212 | ]
213 | },
214 | {
215 | "cell_type": "code",
216 | "metadata": {
217 | "id": "DH1jRr5_Xxo2",
218 | "colab": {
219 | "base_uri": "https://localhost:8080/"
220 | },
221 | "outputId": "3b653c4a-c9b7-4e7e-c9b9-767272aa7351"
222 | },
223 | "source": [
224 | "# Power 2*2*2\n",
225 | "2**3"
226 | ],
227 | "execution_count": null,
228 | "outputs": [
229 | {
230 | "output_type": "execute_result",
231 | "data": {
232 | "text/plain": [
233 | "8"
234 | ]
235 | },
236 | "metadata": {},
237 | "execution_count": 5
238 | }
239 | ]
240 | },
241 | {
242 | "cell_type": "code",
243 | "metadata": {
244 | "id": "abqfE8I2C2cr",
245 | "colab": {
246 | "base_uri": "https://localhost:8080/"
247 | },
248 | "outputId": "46a82bd7-d681-4044-fa41-098d4987505f"
249 | },
250 | "source": [
251 | "# Whole divsion (euclidian) | 5.33 --> 5\n",
252 | "16 // 3"
253 | ],
254 | "execution_count": null,
255 | "outputs": [
256 | {
257 | "output_type": "execute_result",
258 | "data": {
259 | "text/plain": [
260 | "5"
261 | ]
262 | },
263 | "metadata": {},
264 | "execution_count": 6
265 | }
266 | ]
267 | },
268 | {
269 | "cell_type": "code",
270 | "metadata": {
271 | "id": "SnktoxGAC_ew",
272 | "colab": {
273 | "base_uri": "https://localhost:8080/"
274 | },
275 | "outputId": "b9fe0594-8098-4e84-a187-faac87993517"
276 | },
277 | "source": [
278 | "# Modulo | 16 = 5*3 + 1 \n",
279 | "16 % 3"
280 | ],
281 | "execution_count": null,
282 | "outputs": [
283 | {
284 | "output_type": "execute_result",
285 | "data": {
286 | "text/plain": [
287 | "1"
288 | ]
289 | },
290 | "metadata": {},
291 | "execution_count": 7
292 | }
293 | ]
294 | },
295 | {
296 | "cell_type": "markdown",
297 | "metadata": {
298 | "id": "iEQQbsVFWkKi"
299 | },
300 | "source": [
301 | "##### String"
302 | ]
303 | },
304 | {
305 | "cell_type": "code",
306 | "metadata": {
307 | "id": "8jOPFgexDF2H",
308 | "colab": {
309 | "base_uri": "https://localhost:8080/"
310 | },
311 | "outputId": "231a1cf4-dc96-4a8f-a1dc-1fdabe7b599c"
312 | },
313 | "source": [
314 | "# Simple string\n",
315 | "print(\"I'm an information\")"
316 | ],
317 | "execution_count": null,
318 | "outputs": [
319 | {
320 | "output_type": "stream",
321 | "name": "stdout",
322 | "text": [
323 | "I'm an information\n"
324 | ]
325 | }
326 | ]
327 | },
328 | {
329 | "cell_type": "code",
330 | "metadata": {
331 | "colab": {
332 | "base_uri": "https://localhost:8080/"
333 | },
334 | "id": "ibeFvaYOnCDd",
335 | "outputId": "a4ad6243-c950-467e-8ece-40b9ab564147"
336 | },
337 | "source": [
338 | "# Add a tabulation\n",
339 | "print(\"Mean:10% \\t Volatily:10%\")"
340 | ],
341 | "execution_count": null,
342 | "outputs": [
343 | {
344 | "output_type": "stream",
345 | "name": "stdout",
346 | "text": [
347 | "Mean:10% \t Volatily:10%\n"
348 | ]
349 | }
350 | ]
351 | },
352 | {
353 | "cell_type": "code",
354 | "metadata": {
355 | "colab": {
356 | "base_uri": "https://localhost:8080/"
357 | },
358 | "id": "rGWkCu3vpDoW",
359 | "outputId": "1063cef1-86b7-4b40-b9ff-db1a3f0447d8"
360 | },
361 | "source": [
362 | "# Skip a line\n",
363 | "print(\"Mean:10% \\nVolatily:10%\")"
364 | ],
365 | "execution_count": null,
366 | "outputs": [
367 | {
368 | "output_type": "stream",
369 | "name": "stdout",
370 | "text": [
371 | "Mean:10% \n",
372 | "Volatily:10%\n"
373 | ]
374 | }
375 | ]
376 | },
377 | {
378 | "cell_type": "code",
379 | "metadata": {
380 | "id": "zLAVLu5rWv2a",
381 | "colab": {
382 | "base_uri": "https://localhost:8080/"
383 | },
384 | "outputId": "c8a2ea8f-5b3f-4bca-bbc1-4e8b7e807720"
385 | },
386 | "source": [
387 | "# Dynamic String (first possibility: simple string using the format function)\n",
388 | "print(\"Tesla stock price: {}$ at date {}\".format(110,\"01-01-2020\"))"
389 | ],
390 | "execution_count": null,
391 | "outputs": [
392 | {
393 | "output_type": "stream",
394 | "name": "stdout",
395 | "text": [
396 | "Tesla stock price: 110$ at date 01-01-2020\n"
397 | ]
398 | }
399 | ]
400 | },
401 | {
402 | "cell_type": "code",
403 | "metadata": {
404 | "id": "shGzNr67Wvx0",
405 | "colab": {
406 | "base_uri": "https://localhost:8080/"
407 | },
408 | "outputId": "00ddcbd2-3003-4217-ce45-ea3ac520a23d"
409 | },
410 | "source": [
411 | "# Dynamic String (second possibility: f-string )\n",
412 | "print(f\"Tesla stock price: {110}$ at date {'01-01-2010'}\")"
413 | ],
414 | "execution_count": null,
415 | "outputs": [
416 | {
417 | "output_type": "stream",
418 | "name": "stdout",
419 | "text": [
420 | "Tesla stock price: 110$ at date 01-01-2010\n"
421 | ]
422 | }
423 | ]
424 | },
425 | {
426 | "cell_type": "code",
427 | "metadata": {
428 | "colab": {
429 | "base_uri": "https://localhost:8080/"
430 | },
431 | "id": "Uaz_tqJgpMae",
432 | "outputId": "5b16d6fa-e4bf-425e-d45b-9106e7cb496e"
433 | },
434 | "source": [
435 | "# Round a number into a f-string\n",
436 | "print(f\"Tesla stock price: {'%.1f' % 110.15645147854}$\")"
437 | ],
438 | "execution_count": null,
439 | "outputs": [
440 | {
441 | "output_type": "stream",
442 | "name": "stdout",
443 | "text": [
444 | "Tesla stock price: 110.2$\n"
445 | ]
446 | }
447 | ]
448 | },
449 | {
450 | "cell_type": "code",
451 | "metadata": {
452 | "id": "ud27MNZYdwSG",
453 | "colab": {
454 | "base_uri": "https://localhost:8080/",
455 | "height": 37
456 | },
457 | "outputId": "8ea0fded-3b6e-4c2f-c790-a595162851e8"
458 | },
459 | "source": [
460 | "# Slicing on strings\n",
461 | "\"I'm an information\"[0:6]"
462 | ],
463 | "execution_count": null,
464 | "outputs": [
465 | {
466 | "output_type": "execute_result",
467 | "data": {
468 | "application/vnd.google.colaboratory.intrinsic+json": {
469 | "type": "string"
470 | },
471 | "text/plain": [
472 | "\"I'm an\""
473 | ]
474 | },
475 | "metadata": {},
476 | "execution_count": 26
477 | }
478 | ]
479 | },
480 | {
481 | "cell_type": "markdown",
482 | "metadata": {
483 | "id": "JUULnsP_Xemv"
484 | },
485 | "source": [
486 | "##### Booleans / logical operations"
487 | ]
488 | },
489 | {
490 | "cell_type": "code",
491 | "metadata": {
492 | "id": "vM_KlXcMWvtr",
493 | "colab": {
494 | "base_uri": "https://localhost:8080/"
495 | },
496 | "outputId": "e133c351-1656-4fb5-a0f3-b7f8893afe88"
497 | },
498 | "source": [
499 | "# Boolean type (True)\n",
500 | "True"
501 | ],
502 | "execution_count": null,
503 | "outputs": [
504 | {
505 | "output_type": "execute_result",
506 | "data": {
507 | "text/plain": [
508 | "True"
509 | ]
510 | },
511 | "metadata": {},
512 | "execution_count": 27
513 | }
514 | ]
515 | },
516 | {
517 | "cell_type": "code",
518 | "metadata": {
519 | "id": "53gTC6s5WvsF",
520 | "colab": {
521 | "base_uri": "https://localhost:8080/"
522 | },
523 | "outputId": "b4e99819-2bed-4215-8ef0-43710462f526"
524 | },
525 | "source": [
526 | "# Boolean type (False)\n",
527 | "False"
528 | ],
529 | "execution_count": null,
530 | "outputs": [
531 | {
532 | "output_type": "execute_result",
533 | "data": {
534 | "text/plain": [
535 | "False"
536 | ]
537 | },
538 | "metadata": {},
539 | "execution_count": 28
540 | }
541 | ]
542 | },
543 | {
544 | "cell_type": "code",
545 | "metadata": {
546 | "id": "IoozzT2bdK_u",
547 | "colab": {
548 | "base_uri": "https://localhost:8080/"
549 | },
550 | "outputId": "d99e36c5-b946-4b50-8b74-0281af3a4c6c"
551 | },
552 | "source": [
553 | "# Equality\n",
554 | "5 == 6"
555 | ],
556 | "execution_count": null,
557 | "outputs": [
558 | {
559 | "output_type": "execute_result",
560 | "data": {
561 | "text/plain": [
562 | "False"
563 | ]
564 | },
565 | "metadata": {},
566 | "execution_count": 29
567 | }
568 | ]
569 | },
570 | {
571 | "cell_type": "code",
572 | "metadata": {
573 | "id": "_f1XD2w3dgY5",
574 | "colab": {
575 | "base_uri": "https://localhost:8080/"
576 | },
577 | "outputId": "d704a978-1775-4be1-e503-bce578714055"
578 | },
579 | "source": [
580 | "# Sup\n",
581 | "5 > 6"
582 | ],
583 | "execution_count": null,
584 | "outputs": [
585 | {
586 | "output_type": "execute_result",
587 | "data": {
588 | "text/plain": [
589 | "False"
590 | ]
591 | },
592 | "metadata": {},
593 | "execution_count": 30
594 | }
595 | ]
596 | },
597 | {
598 | "cell_type": "code",
599 | "metadata": {
600 | "id": "yZj4kBbLdkUo",
601 | "colab": {
602 | "base_uri": "https://localhost:8080/"
603 | },
604 | "outputId": "1ac716cf-96ff-40d4-ad3f-3306b85b9066"
605 | },
606 | "source": [
607 | "# Inf\n",
608 | "5 < 6"
609 | ],
610 | "execution_count": null,
611 | "outputs": [
612 | {
613 | "output_type": "execute_result",
614 | "data": {
615 | "text/plain": [
616 | "True"
617 | ]
618 | },
619 | "metadata": {},
620 | "execution_count": 31
621 | }
622 | ]
623 | },
624 | {
625 | "cell_type": "code",
626 | "metadata": {
627 | "id": "BbEIqsW4ducB",
628 | "colab": {
629 | "base_uri": "https://localhost:8080/"
630 | },
631 | "outputId": "28a920a1-4e09-420c-e792-92483b8ff17e"
632 | },
633 | "source": [
634 | "# Not Equal\n",
635 | "5 != 6"
636 | ],
637 | "execution_count": null,
638 | "outputs": [
639 | {
640 | "output_type": "execute_result",
641 | "data": {
642 | "text/plain": [
643 | "True"
644 | ]
645 | },
646 | "metadata": {},
647 | "execution_count": 32
648 | }
649 | ]
650 | },
651 | {
652 | "cell_type": "code",
653 | "metadata": {
654 | "id": "15J-4du3d0o-",
655 | "colab": {
656 | "base_uri": "https://localhost:8080/"
657 | },
658 | "outputId": "e231bd80-2c5d-4660-ce69-5716dd983eb8"
659 | },
660 | "source": [
661 | "# And \n",
662 | "(1<2) and (5>6)"
663 | ],
664 | "execution_count": null,
665 | "outputs": [
666 | {
667 | "output_type": "execute_result",
668 | "data": {
669 | "text/plain": [
670 | "False"
671 | ]
672 | },
673 | "metadata": {},
674 | "execution_count": 35
675 | }
676 | ]
677 | },
678 | {
679 | "cell_type": "code",
680 | "metadata": {
681 | "id": "XtzLTurHd47e",
682 | "colab": {
683 | "base_uri": "https://localhost:8080/"
684 | },
685 | "outputId": "1f1de212-b53b-4547-cab4-6d4a309db4d1"
686 | },
687 | "source": [
688 | "# Or\n",
689 | "(1<2) or (5>6)"
690 | ],
691 | "execution_count": null,
692 | "outputs": [
693 | {
694 | "output_type": "execute_result",
695 | "data": {
696 | "text/plain": [
697 | "True"
698 | ]
699 | },
700 | "metadata": {},
701 | "execution_count": 36
702 | }
703 | ]
704 | },
705 | {
706 | "cell_type": "code",
707 | "metadata": {
708 | "id": "pTRdjRHyZKZ7",
709 | "colab": {
710 | "base_uri": "https://localhost:8080/"
711 | },
712 | "outputId": "a383c1c0-faf9-4db1-c2d4-f122d072a624"
713 | },
714 | "source": [
715 | "# Not \n",
716 | "not (5>6)"
717 | ],
718 | "execution_count": null,
719 | "outputs": [
720 | {
721 | "output_type": "execute_result",
722 | "data": {
723 | "text/plain": [
724 | "True"
725 | ]
726 | },
727 | "metadata": {},
728 | "execution_count": 38
729 | }
730 | ]
731 | },
732 | {
733 | "cell_type": "markdown",
734 | "metadata": {
735 | "id": "cGqtdDyYX1Dk"
736 | },
737 | "source": [
738 | "##### Variable assignment"
739 | ]
740 | },
741 | {
742 | "cell_type": "code",
743 | "metadata": {
744 | "id": "q3PsKlhZWvlz",
745 | "colab": {
746 | "base_uri": "https://localhost:8080/"
747 | },
748 | "outputId": "63b86c48-9089-428f-be22-44c593c02641"
749 | },
750 | "source": [
751 | "# Numerical variables\n",
752 | "x = 6\n",
753 | "y = 6\n",
754 | "print(x + y)"
755 | ],
756 | "execution_count": null,
757 | "outputs": [
758 | {
759 | "output_type": "stream",
760 | "name": "stdout",
761 | "text": [
762 | "12\n"
763 | ]
764 | }
765 | ]
766 | },
767 | {
768 | "cell_type": "code",
769 | "metadata": {
770 | "id": "NrwwCpCCWvkU",
771 | "colab": {
772 | "base_uri": "https://localhost:8080/"
773 | },
774 | "outputId": "da5d461e-45aa-49dc-ff93-1f2fbff625f3"
775 | },
776 | "source": [
777 | "# String variables\n",
778 | "date = \"03-01-2020\"\n",
779 | "price = 150\n",
780 | "info = f\"Tesla: {price}, date: {date}\"\n",
781 | "\n",
782 | "print(info)"
783 | ],
784 | "execution_count": null,
785 | "outputs": [
786 | {
787 | "output_type": "stream",
788 | "name": "stdout",
789 | "text": [
790 | "Tesla: 150, date: 03-01-2020\n"
791 | ]
792 | }
793 | ]
794 | },
795 | {
796 | "cell_type": "code",
797 | "metadata": {
798 | "id": "ufENsej-WveT",
799 | "colab": {
800 | "base_uri": "https://localhost:8080/"
801 | },
802 | "outputId": "3a5216b2-7619-49f9-b48a-0af87142bb76"
803 | },
804 | "source": [
805 | "# Boolean variables\n",
806 | "time = \"20:00\"\n",
807 | "market_open = (\"08:00\" < time) and (time < \"19:00\")\n",
808 | "print(market_open)"
809 | ],
810 | "execution_count": null,
811 | "outputs": [
812 | {
813 | "output_type": "stream",
814 | "name": "stdout",
815 | "text": [
816 | "False\n"
817 | ]
818 | }
819 | ]
820 | },
821 | {
822 | "cell_type": "markdown",
823 | "metadata": {
824 | "id": "EMAdDk_6YXgw"
825 | },
826 | "source": [
827 | "##### Tuples, lists"
828 | ]
829 | },
830 | {
831 | "cell_type": "code",
832 | "metadata": {
833 | "id": "WY3Eyz5PWvcm",
834 | "colab": {
835 | "base_uri": "https://localhost:8080/"
836 | },
837 | "outputId": "78bffd20-dc78-4e41-b509-b0e822809c52"
838 | },
839 | "source": [
840 | "# Tuple\n",
841 | "my_tuple = (1,2,3)\n",
842 | "my_tuple"
843 | ],
844 | "execution_count": null,
845 | "outputs": [
846 | {
847 | "output_type": "execute_result",
848 | "data": {
849 | "text/plain": [
850 | "(1, 2, 3)"
851 | ]
852 | },
853 | "metadata": {},
854 | "execution_count": 47
855 | }
856 | ]
857 | },
858 | {
859 | "cell_type": "code",
860 | "metadata": {
861 | "id": "L7RGe8QgWvYt",
862 | "colab": {
863 | "base_uri": "https://localhost:8080/"
864 | },
865 | "outputId": "807431bc-4bd3-427e-c252-78660b62074b"
866 | },
867 | "source": [
868 | "# List creation\n",
869 | "my_list = [1,2,3,4,5,6,7,8,9,10]\n",
870 | "my_list"
871 | ],
872 | "execution_count": null,
873 | "outputs": [
874 | {
875 | "output_type": "execute_result",
876 | "data": {
877 | "text/plain": [
878 | "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]"
879 | ]
880 | },
881 | "metadata": {},
882 | "execution_count": 48
883 | }
884 | ]
885 | },
886 | {
887 | "cell_type": "code",
888 | "metadata": {
889 | "id": "OSQw1R5yWvPy",
890 | "colab": {
891 | "base_uri": "https://localhost:8080/"
892 | },
893 | "outputId": "050ca0f6-57ed-4866-be1c-1a5f75c088d9"
894 | },
895 | "source": [
896 | "# Adding value\n",
897 | "my_list.append(11)\n",
898 | "my_list"
899 | ],
900 | "execution_count": null,
901 | "outputs": [
902 | {
903 | "output_type": "execute_result",
904 | "data": {
905 | "text/plain": [
906 | "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]"
907 | ]
908 | },
909 | "metadata": {},
910 | "execution_count": 49
911 | }
912 | ]
913 | },
914 | {
915 | "cell_type": "code",
916 | "metadata": {
917 | "colab": {
918 | "base_uri": "https://localhost:8080/"
919 | },
920 | "id": "8p9Tpd42zOq_",
921 | "outputId": "e8928d7f-a15b-4de0-a11c-8930469e27be"
922 | },
923 | "source": [
924 | "# Adding value\n",
925 | "my_list.extend([12,13,14,15,16,17])\n",
926 | "my_list"
927 | ],
928 | "execution_count": null,
929 | "outputs": [
930 | {
931 | "output_type": "execute_result",
932 | "data": {
933 | "text/plain": [
934 | "[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]"
935 | ]
936 | },
937 | "metadata": {},
938 | "execution_count": 50
939 | }
940 | ]
941 | },
942 | {
943 | "cell_type": "code",
944 | "metadata": {
945 | "id": "i391z7t4ZwnM",
946 | "colab": {
947 | "base_uri": "https://localhost:8080/"
948 | },
949 | "outputId": "17bac205-177d-49cf-eea9-b9e79bbd76ae"
950 | },
951 | "source": [
952 | "# Indexing\n",
953 | "my_list[0]"
954 | ],
955 | "execution_count": null,
956 | "outputs": [
957 | {
958 | "output_type": "execute_result",
959 | "data": {
960 | "text/plain": [
961 | "1"
962 | ]
963 | },
964 | "metadata": {},
965 | "execution_count": 51
966 | }
967 | ]
968 | },
969 | {
970 | "cell_type": "code",
971 | "metadata": {
972 | "id": "owXGp0IsZ3Lg",
973 | "colab": {
974 | "base_uri": "https://localhost:8080/"
975 | },
976 | "outputId": "42f37399-d777-46ba-c645-1e66a5354e23"
977 | },
978 | "source": [
979 | "# Value range selection\n",
980 | "my_list[0:9]"
981 | ],
982 | "execution_count": null,
983 | "outputs": [
984 | {
985 | "output_type": "execute_result",
986 | "data": {
987 | "text/plain": [
988 | "[1, 2, 3, 4, 5, 6, 7, 8, 9]"
989 | ]
990 | },
991 | "metadata": {},
992 | "execution_count": 52
993 | }
994 | ]
995 | },
996 | {
997 | "cell_type": "code",
998 | "metadata": {
999 | "id": "g5SsaYNjZ6Jo",
1000 | "colab": {
1001 | "base_uri": "https://localhost:8080/"
1002 | },
1003 | "outputId": "5300ac9e-252f-4aaa-fc9d-ac4ffa949ade"
1004 | },
1005 | "source": [
1006 | "# Delete a value\n",
1007 | "del my_list[0]\n",
1008 | "my_list"
1009 | ],
1010 | "execution_count": null,
1011 | "outputs": [
1012 | {
1013 | "output_type": "execute_result",
1014 | "data": {
1015 | "text/plain": [
1016 | "[2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]"
1017 | ]
1018 | },
1019 | "metadata": {},
1020 | "execution_count": 53
1021 | }
1022 | ]
1023 | },
1024 | {
1025 | "cell_type": "code",
1026 | "metadata": {
1027 | "id": "JH1xzsjTZOhr",
1028 | "colab": {
1029 | "base_uri": "https://localhost:8080/"
1030 | },
1031 | "outputId": "b03ae4b3-2f68-45b9-f43c-742178f340b0"
1032 | },
1033 | "source": [
1034 | "# Bonus: Nested List\n",
1035 | "my_list = [[1,15], 3, \"Finance\"]\n",
1036 | "\n",
1037 | "# Print the sublist\n",
1038 | "print(my_list[0])\n",
1039 | "\n",
1040 | "# Print value 15\n",
1041 | "print(my_list[0][1])"
1042 | ],
1043 | "execution_count": null,
1044 | "outputs": [
1045 | {
1046 | "output_type": "stream",
1047 | "name": "stdout",
1048 | "text": [
1049 | "[1, 15]\n",
1050 | "15\n"
1051 | ]
1052 | }
1053 | ]
1054 | },
1055 | {
1056 | "cell_type": "markdown",
1057 | "metadata": {
1058 | "id": "Kd-SYHI-ZF85"
1059 | },
1060 | "source": [
1061 | "##### Dictionary"
1062 | ]
1063 | },
1064 | {
1065 | "cell_type": "code",
1066 | "metadata": {
1067 | "id": "7PasvUGAZw7L"
1068 | },
1069 | "source": [
1070 | "# Initialize a dictionnary\n",
1071 | "dic = {}"
1072 | ],
1073 | "execution_count": null,
1074 | "outputs": []
1075 | },
1076 | {
1077 | "cell_type": "code",
1078 | "metadata": {
1079 | "id": "FngIfxOfZ-o5",
1080 | "colab": {
1081 | "base_uri": "https://localhost:8080/"
1082 | },
1083 | "outputId": "523f8c4a-6821-4911-e406-638a216c7dcc"
1084 | },
1085 | "source": [
1086 | "# Initialize with values\n",
1087 | "dic = {\"Tesla price\" : 1500,\n",
1088 | " \"Google price\": 3000}\n",
1089 | "dic"
1090 | ],
1091 | "execution_count": null,
1092 | "outputs": [
1093 | {
1094 | "output_type": "execute_result",
1095 | "data": {
1096 | "text/plain": [
1097 | "{'Google price': 3000, 'Tesla price': 1500}"
1098 | ]
1099 | },
1100 | "metadata": {},
1101 | "execution_count": 59
1102 | }
1103 | ]
1104 | },
1105 | {
1106 | "cell_type": "code",
1107 | "metadata": {
1108 | "id": "XT9t_7nraYJL",
1109 | "colab": {
1110 | "base_uri": "https://localhost:8080/"
1111 | },
1112 | "outputId": "dfbd29d5-bc18-462b-9556-632f234eaf4d"
1113 | },
1114 | "source": [
1115 | "# Add a value\n",
1116 | "dic[\"Microsoft price\"] = 1500\n",
1117 | "dic"
1118 | ],
1119 | "execution_count": null,
1120 | "outputs": [
1121 | {
1122 | "output_type": "execute_result",
1123 | "data": {
1124 | "text/plain": [
1125 | "{'Google price': 3000, 'Microsoft price': 1500, 'Tesla price': 1500}"
1126 | ]
1127 | },
1128 | "metadata": {},
1129 | "execution_count": 60
1130 | }
1131 | ]
1132 | },
1133 | {
1134 | "cell_type": "code",
1135 | "metadata": {
1136 | "colab": {
1137 | "base_uri": "https://localhost:8080/"
1138 | },
1139 | "id": "1fnoJHGmaRtG",
1140 | "outputId": "5b6adf4d-bd19-4e3a-9272-8aa929c52c21"
1141 | },
1142 | "source": [
1143 | "# Change a value\n",
1144 | "dic[\"Microsoft price\"] = 3000\n",
1145 | "dic"
1146 | ],
1147 | "execution_count": null,
1148 | "outputs": [
1149 | {
1150 | "output_type": "execute_result",
1151 | "data": {
1152 | "text/plain": [
1153 | "{'Google price': 3000, 'Microsoft price': 3000, 'Tesla price': 1500}"
1154 | ]
1155 | },
1156 | "metadata": {},
1157 | "execution_count": 61
1158 | }
1159 | ]
1160 | },
1161 | {
1162 | "cell_type": "code",
1163 | "metadata": {
1164 | "id": "t4GhmGtdapWP",
1165 | "colab": {
1166 | "base_uri": "https://localhost:8080/"
1167 | },
1168 | "outputId": "db4e8388-5893-4198-852c-a8240fb4c9f2"
1169 | },
1170 | "source": [
1171 | "# Extract a value\n",
1172 | "dic[\"Microsoft price\"]"
1173 | ],
1174 | "execution_count": null,
1175 | "outputs": [
1176 | {
1177 | "output_type": "execute_result",
1178 | "data": {
1179 | "text/plain": [
1180 | "3000"
1181 | ]
1182 | },
1183 | "metadata": {},
1184 | "execution_count": 62
1185 | }
1186 | ]
1187 | },
1188 | {
1189 | "cell_type": "code",
1190 | "metadata": {
1191 | "colab": {
1192 | "base_uri": "https://localhost:8080/"
1193 | },
1194 | "id": "rOBalLlC3Et8",
1195 | "outputId": "917f94cb-b245-499b-d306-f1916699142f"
1196 | },
1197 | "source": [
1198 | "# Delete a value\n",
1199 | "del dic[\"Microsoft price\"]\n",
1200 | "dic"
1201 | ],
1202 | "execution_count": null,
1203 | "outputs": [
1204 | {
1205 | "output_type": "execute_result",
1206 | "data": {
1207 | "text/plain": [
1208 | "{'Google price': 3000, 'Tesla price': 1500}"
1209 | ]
1210 | },
1211 | "metadata": {},
1212 | "execution_count": 63
1213 | }
1214 | ]
1215 | },
1216 | {
1217 | "cell_type": "code",
1218 | "metadata": {
1219 | "colab": {
1220 | "base_uri": "https://localhost:8080/"
1221 | },
1222 | "id": "otvn059la3Ct",
1223 | "outputId": "091edcda-ea36-45b2-e95c-0c5142427f75"
1224 | },
1225 | "source": [
1226 | "# How to extract the key names\n",
1227 | "dic.keys()"
1228 | ],
1229 | "execution_count": null,
1230 | "outputs": [
1231 | {
1232 | "output_type": "execute_result",
1233 | "data": {
1234 | "text/plain": [
1235 | "dict_keys(['Tesla price', 'Google price'])"
1236 | ]
1237 | },
1238 | "metadata": {},
1239 | "execution_count": 64
1240 | }
1241 | ]
1242 | },
1243 | {
1244 | "cell_type": "code",
1245 | "metadata": {
1246 | "colab": {
1247 | "base_uri": "https://localhost:8080/"
1248 | },
1249 | "id": "ndKUymfzbF4t",
1250 | "outputId": "9a1b3f20-e79f-472e-ea27-88001260ca48"
1251 | },
1252 | "source": [
1253 | "# How to extract the values names\n",
1254 | "dic.values()"
1255 | ],
1256 | "execution_count": null,
1257 | "outputs": [
1258 | {
1259 | "output_type": "execute_result",
1260 | "data": {
1261 | "text/plain": [
1262 | "dict_values([1500, 3000])"
1263 | ]
1264 | },
1265 | "metadata": {},
1266 | "execution_count": 65
1267 | }
1268 | ]
1269 | },
1270 | {
1271 | "cell_type": "markdown",
1272 | "metadata": {
1273 | "id": "2UHCKDk8bJEf"
1274 | },
1275 | "source": [
1276 | "##### Sets"
1277 | ]
1278 | },
1279 | {
1280 | "cell_type": "code",
1281 | "metadata": {
1282 | "id": "viHNp-EHbQ9H",
1283 | "colab": {
1284 | "base_uri": "https://localhost:8080/"
1285 | },
1286 | "outputId": "e1600ec1-f1fd-4784-eb79-6ee33056d979"
1287 | },
1288 | "source": [
1289 | "# Create a set\n",
1290 | "{1,3,9}"
1291 | ],
1292 | "execution_count": null,
1293 | "outputs": [
1294 | {
1295 | "output_type": "execute_result",
1296 | "data": {
1297 | "text/plain": [
1298 | "{1, 3, 9}"
1299 | ]
1300 | },
1301 | "metadata": {},
1302 | "execution_count": 68
1303 | }
1304 | ]
1305 | },
1306 | {
1307 | "cell_type": "code",
1308 | "metadata": {
1309 | "id": "_E1aFnTcbYpJ",
1310 | "colab": {
1311 | "base_uri": "https://localhost:8080/"
1312 | },
1313 | "outputId": "3d8f68a2-5acd-4cf5-d303-6844700b0671"
1314 | },
1315 | "source": [
1316 | "# View a property\n",
1317 | "{1,1,1, 3,3,3, 9,9,9}"
1318 | ],
1319 | "execution_count": null,
1320 | "outputs": [
1321 | {
1322 | "output_type": "execute_result",
1323 | "data": {
1324 | "text/plain": [
1325 | "{1, 3, 9}"
1326 | ]
1327 | },
1328 | "metadata": {},
1329 | "execution_count": 69
1330 | }
1331 | ]
1332 | },
1333 | {
1334 | "cell_type": "code",
1335 | "metadata": {
1336 | "id": "2kc9rLF6be3l",
1337 | "colab": {
1338 | "base_uri": "https://localhost:8080/"
1339 | },
1340 | "outputId": "49404fe9-4990-46b5-b5a9-3301604b9cf9"
1341 | },
1342 | "source": [
1343 | "# Create a list\n",
1344 | "my_list = [\"Finance\", \"Statistics\", \"Mathematics\",\n",
1345 | " \"Finance\", \"Statistics\", \"Finance\",\n",
1346 | " \"Mathematics\", \"Finance\", \"Statistics\"]\n",
1347 | "\n",
1348 | "# Transform the list into a set\n",
1349 | "set(my_list)"
1350 | ],
1351 | "execution_count": null,
1352 | "outputs": [
1353 | {
1354 | "output_type": "execute_result",
1355 | "data": {
1356 | "text/plain": [
1357 | "{'Finance', 'Mathematics', 'Statistics'}"
1358 | ]
1359 | },
1360 | "metadata": {},
1361 | "execution_count": 70
1362 | }
1363 | ]
1364 | },
1365 | {
1366 | "cell_type": "code",
1367 | "metadata": {
1368 | "id": "s2b-8LgkcLs1",
1369 | "colab": {
1370 | "base_uri": "https://localhost:8080/"
1371 | },
1372 | "outputId": "4ef0fc8b-519c-48fe-edb6-288ff73f03cf"
1373 | },
1374 | "source": [
1375 | "# Add a value\n",
1376 | "s = {1,3,5}\n",
1377 | "print(s)\n",
1378 | "\n",
1379 | "s.add(56)\n",
1380 | "s.add(68)\n",
1381 | "print(s)"
1382 | ],
1383 | "execution_count": null,
1384 | "outputs": [
1385 | {
1386 | "output_type": "stream",
1387 | "name": "stdout",
1388 | "text": [
1389 | "{1, 3, 5}\n",
1390 | "{1, 3, 68, 5, 56}\n"
1391 | ]
1392 | }
1393 | ]
1394 | },
1395 | {
1396 | "cell_type": "markdown",
1397 | "metadata": {
1398 | "id": "W9Vc62veaNKg"
1399 | },
1400 | "source": [
1401 | "### Python Structures"
1402 | ]
1403 | },
1404 | {
1405 | "cell_type": "markdown",
1406 | "metadata": {
1407 | "id": "7xKs11J6akHQ"
1408 | },
1409 | "source": [
1410 | "##### If/ Elif/ Else"
1411 | ]
1412 | },
1413 | {
1414 | "cell_type": "code",
1415 | "metadata": {
1416 | "id": "CqZigieEaOkf"
1417 | },
1418 | "source": [
1419 | "# Conditionnal structure IF\n",
1420 | "if 5>6:\n",
1421 | " print(\"yes\")"
1422 | ],
1423 | "execution_count": null,
1424 | "outputs": []
1425 | },
1426 | {
1427 | "cell_type": "code",
1428 | "metadata": {
1429 | "id": "neKqpCKn8y9N",
1430 | "colab": {
1431 | "base_uri": "https://localhost:8080/"
1432 | },
1433 | "outputId": "8cc9ffdc-3d28-469d-fc3e-75c82650ff2c"
1434 | },
1435 | "source": [
1436 | "# Conditionnal structure IF/ ELSE\n",
1437 | "if 5>6:\n",
1438 | " print(\"yes\")\n",
1439 | "else:\n",
1440 | " print(\"no\")"
1441 | ],
1442 | "execution_count": null,
1443 | "outputs": [
1444 | {
1445 | "output_type": "stream",
1446 | "name": "stdout",
1447 | "text": [
1448 | "no\n"
1449 | ]
1450 | }
1451 | ]
1452 | },
1453 | {
1454 | "cell_type": "code",
1455 | "metadata": {
1456 | "id": "qEKi-yu_873c",
1457 | "colab": {
1458 | "base_uri": "https://localhost:8080/"
1459 | },
1460 | "outputId": "60be59bf-4fb6-4222-9c8f-3d0d9d8858b8"
1461 | },
1462 | "source": [
1463 | "# Conditionnal structure IF/ ELIF/ ELSE\n",
1464 | "x = 11\n",
1465 | "\n",
1466 | "if x>=15:\n",
1467 | " print(\"X>=15\")\n",
1468 | "elif x>10:\n",
1469 | " print(\"10\u001b[0m in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0mmy_function\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 4\u001b[0;31m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mloc\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m",
1824 | "\u001b[0;31mNameError\u001b[0m: name 'loc' is not defined"
1825 | ]
1826 | }
1827 | ]
1828 | },
1829 | {
1830 | "cell_type": "markdown",
1831 | "metadata": {
1832 | "id": "F8rax_dDgnFI"
1833 | },
1834 | "source": [
1835 | "##### Global Variable"
1836 | ]
1837 | },
1838 | {
1839 | "cell_type": "code",
1840 | "metadata": {
1841 | "id": "7330M1h4gpnQ"
1842 | },
1843 | "source": [
1844 | "# Global variable \n",
1845 | "def my_function():\n",
1846 | " global variable\n",
1847 | " variable=15"
1848 | ],
1849 | "execution_count": null,
1850 | "outputs": []
1851 | },
1852 | {
1853 | "cell_type": "code",
1854 | "metadata": {
1855 | "id": "LgzzqLCDgp-M"
1856 | },
1857 | "source": [
1858 | "# Run the function and print the global variable \n",
1859 | "my_function()"
1860 | ],
1861 | "execution_count": null,
1862 | "outputs": []
1863 | },
1864 | {
1865 | "cell_type": "code",
1866 | "metadata": {
1867 | "colab": {
1868 | "base_uri": "https://localhost:8080/"
1869 | },
1870 | "id": "KFEQ7BB-2m5g",
1871 | "outputId": "4a40a4de-995a-4eca-b18b-bce5d6b1c213"
1872 | },
1873 | "source": [
1874 | "print(variable)"
1875 | ],
1876 | "execution_count": null,
1877 | "outputs": [
1878 | {
1879 | "output_type": "stream",
1880 | "name": "stdout",
1881 | "text": [
1882 | "15\n"
1883 | ]
1884 | }
1885 | ]
1886 | },
1887 | {
1888 | "cell_type": "markdown",
1889 | "metadata": {
1890 | "id": "4NWfx4mRhpgX"
1891 | },
1892 | "source": [
1893 | "##### Lambda"
1894 | ]
1895 | },
1896 | {
1897 | "cell_type": "code",
1898 | "metadata": {
1899 | "id": "mhxlEyFthuQa"
1900 | },
1901 | "source": [
1902 | "# Creation lambda oject\n",
1903 | "f = lambda x: x**2"
1904 | ],
1905 | "execution_count": null,
1906 | "outputs": []
1907 | },
1908 | {
1909 | "cell_type": "code",
1910 | "metadata": {
1911 | "id": "NFQxwMIWh-B_",
1912 | "colab": {
1913 | "base_uri": "https://localhost:8080/"
1914 | },
1915 | "outputId": "34fab93f-0767-4376-f774-a49c803b5900"
1916 | },
1917 | "source": [
1918 | "# Create a list to apply a lambda function\n",
1919 | "lis = [1,2,3,4,5,6,7,8]\n",
1920 | "\n",
1921 | "# Use map function to apply lambda function to a list\n",
1922 | "generator = map(f,lis)\n",
1923 | "generator"
1924 | ],
1925 | "execution_count": null,
1926 | "outputs": [
1927 | {
1928 | "output_type": "execute_result",
1929 | "data": {
1930 | "text/plain": [
1931 | "