Created
June 28, 2021 06:59
-
-
Save dmgolembiowski/c219c5f601960b802893c6018b435473 to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env python3 | |
demo = [[ 1, 2 ], [3, 4, 5], [6, 7, 8, 9]] | |
flattened = [] | |
[ | |
flattened.extend(smol_list) | |
for smol_list in demo | |
] | |
demo = flattened |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment