3 lines
50 B
Python

x = {a for a in l}
x = {a + b for a, b in l if b}