Re:Pattern matching accepted for Python
by joshuamorton on Tuesday February 09, 2021 @06:41PM
(#26084055)
Fwiw, I find creating a 2d array and then flattening (`itertools.chain.from_iterable([[None for _y in range(y)] for _x in range(x)])` to be both readable and reasonably concise, though yes explicit loops are also fine.
[ Parent
| on HN ]