# one liner fibonacci function to generate a list of fib numbers in O(n) time
# obviously uses the walrus operator so valid from python3.8
fib = lambda n: (lambda n, l: ( [l.__setitem__(i,(l[i-2] + l[i-1])) for i in range(2, n)]))(n, l:=[0,1]+[0]*(n-2)) and l
print(fib(50))
# :)
print("hi there")
print("hello world")
# basic email regex in python
import re
string = "The emails are john.doe@example.com, alex@example.com"
pat = r"\b[^\s]+@[^\s]+\.[^\s]+\b"
m = re.findall(pat, string)
print(m)
# done