double comprehension

PHOTO EMBED

Fri Feb 17 2023 15:46:55 GMT+0000 (Coordinated Universal Time)

Saved by @quaie #python

>>> text = (("Hi", "Steve!"), ("What's", "up?"))
>>> [word for sentence in text for word in sentence]
['Hi', 'Steve!', "What's", 'up?']

# my version
asd = [ row for row in list_of_rows for column in row if 'Fachdienst PF' in column ]
content_copyCOPY

https://stackoverflow.com/questions/1198777/double-iteration-in-list-comprehension