Python Basics (2023-06-20 - 2023-06-22)¶
Day 1¶
Setup¶
Basics¶
Datatypes¶
Control Flow, Sequences, Iteration¶
Exercise: Determine Maximum of Two Numbers (solution, in one line, using a generator expression 😉: maximum.py)
Miscellaneous¶
Generating Fibonacci numbers: fibonacci.py
Day2¶
Morning Wakeup¶
Index-based vs. element-based iteration
yield
, again: sequence of yielded element (three in a row), with debug statement in between
Basics¶
Control Flow, Sequences, Iteration¶
More Datatypes¶
From Functions …
Exercise: Primeness (Function) (solution: prime-function.py)
Exercise: Function: uniq() (solution: uniq-function.py)
Exercise: Generator: uniq() (solution: uniq-generator.py)
Day 3¶
File I/O, And Encoding¶
Exercise: Eliminate Empty/Comment-Only Lines
Solution: distill.py
Alternative solution, using a generator expression: distill-yield.py
Exercise Series: CSV Files¶
Links¶
Books¶
Python Videos¶
Python Tutorial for Beginners 4: Lists, Tuples, and Sets, by Corey Schafer
Python Tutorial for Beginners 5: Dictionaries - Working with Key-Value Pairs, by Corey Schafer
Python Tutorial for Beginners 7: Loops and Iterations - For/While Loops, by Corey Schafer
Python Tutorial for Beginners 8: Functions, by Corey Schafer
10 Python Tips and Tricks For Writing Better Code, by Corey Schafer
Python Quick Tip: F-Strings - How to Use Them and Advanced String Formatting, by Corey Schafer