Skip to content

Instantly share code, notes, and snippets.

@hamdyaea
Created November 24, 2020 09:16
Show Gist options
  • Save hamdyaea/f2729875ba6826df3c12156796c18f25 to your computer and use it in GitHub Desktop.
Save hamdyaea/f2729875ba6826df3c12156796c18f25 to your computer and use it in GitHub Desktop.
# 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