Alex Balgavy

Just some stuff about me.

Here's my dotfiles repository.

Check out my blog.

My keys: PGP, SSH

My crypto wallets (BTC, XMR)


What links here:

Nested comprehensions in Python

I found a great explanation of nested comprehensions:

img

Basically, these for loops:

outer = [[1,2], [3,4]]
for inner in outer:
    for num in inner:
        num

Become:

[num for inner in outer for num in inner]