Python fundamentals (colab notebook)

notebook with snippets of basic python code
2025-11-09 16:40
// updated 2025-12-22 15:23

Proceedings from (2025-11-08/09) lectures about Python:

(accessible via link since Google Colab does not allow posting notebooks in an iframe)

Topics mentioned

  • Variables
    • declaring variables
    • string interpolation
    • multi-lined strings
    • escaped characters
    • variable name restrictions
    • variable indexing
    • concatenation
  • Operators
    • arithmetic
    • equality and inequality
    • logical operators
    • value swapping
  • Data structures
    • lists
    • tuples
    • dictionaries
    • sets
  • Immutability and mutability
  • Branches
    • if-else
    • if-elif-else
  • Iteration
    • for (item) in (list) loop
    • for (character) in (string) loop
    • for (item) in (dictionary) loop
    • range keyword
    • while loop
    • list comprehensions
  • Functions
    • functions without parameters
    • functions with parameters
    • lambda functions
    • higher order functions
  • File handling
    • reading from a file
    • writing to a file
    • adding to a file
  • Error handling
    • try + except + finally
  • Iterators
    • generators
    • iterabilization
  • Decorators
  • Regular expressions (regex)
    • finding
    • finding and replacing
    • fuzzy finding and replacing
    • finding strings that begin/end with a character
    • finding either one substring or another
    • removing punctuation
  • User input
⬅️ older (in snippets)
🐍 Python solution: finding the day of the week
newer (in snippets) ➡️
Python unpacking operator 🐍
newer (posts) ➡️
Python unpacking operator 🐍