Created
November 24, 2020 09:16
-
-
Save hamdyaea/f2729875ba6826df3c12156796c18f25 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
# Python code to convert list of tuple into list | |
# Importing | |
import itertools | |
# List of tuple initialization | |
tuple = [(1, 2), (3, 4), (5, 6)] | |
# Using itertools | |
out = list(itertools.chain(*tuple)) | |
# printing output | |
print(out) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment