~/talk

Pythonic FuncProg: List comprehensions

Talkat DevConf.CZ 2023 · 2023-06-16..06-18· [python, functional-programming]
links:none on file
slides:none on file

Shows concrete code that computes squares up to 10 to the 8, compares a for-loop, map/filter and list comprehensions, and measures runtimes: map is slowest, for-loop ~12s (11.5s in a later run) and list comprehension ~10s (8.7s in the filtered case). Demonstrates equivalent patterns: map/filter replacement, flattening nested lists and filtering sublists by length>1, all working as shown; code and examples live at https://github.com/mftb/pythonic-functional-programming.

AI-written summary · about

  1. 0:00Pythonic functional programming
  2. 1:04Iterative squares
  3. 3:20Using map
  4. 5:10List comprehensions
  5. 7:50Benchmarking performance
  6. 8:33Filtering with functional programming
  7. 10:23List comprehensions filtering
  8. 11:29Flattening nested lists
  9. 12:33Advanced filtering
  10. 13:37Performance benefits
  11. 14:20Closing
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.