Online Absolute Beginner Python Tutorials
Every Sunday 2pm (UK time/ BST)
by Cheuk Ting Ho
Get this slide deck:
slides.com/cheukting_ho/python-fuctional
Beginner topics:
Python objects, Control flows,
Functions, modeuls, classes and decorators
strings operations and regex with re
Testing:
pytest with fixtures and mock
property-based testing
python linters & auto-formatters
TDD, type hinting
Intermedite topics:
Iterators, generators, async
Packaging:
generating docs, pypi
In computer science, functional programming is a programming paradigm where programs are constructed by applying and composing functions. -wikipedia
num_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
result = 0
for num in num_list:
if num % 2 == 0:
result += num * 10
from functools import reduce
result = reduce(lambda x,y: x+y,
map(lambda a: a*10,
filter(lambda n: n%2==0,
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10])))
Advantages
Disadvantages
Lambda function
Map
Filter
Reduce
Let's try them out
Sunday 2pm (UK time/ BST)
There are also Mid Meet Py every Wednesday 1pm