Last active
March 30, 2026 16:29
-
-
Save koi8-r/3925773f6700d0d2d7bfe7627ef767fd to your computer and use it in GitHub Desktop.
Python netsed list comprehension
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| m = [[1, 2, 3], [4, 5, 6], [7, 8, 9]] | |
| ll = [i for l in m for i in l] | |
| assert list(range(1, 10)) == ll |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment