walrus operator code example
Example: walrus operator python 3.8
# Loop over fixed length blocks using Walrus Operator
while (block := f.read(256)) != '':
process(block)
# Loop over fixed length blocks using Walrus Operator
while (block := f.read(256)) != '':
process(block)