Skip to content

Instantly share code, notes, and snippets.

@reflash
Created September 28, 2018 19:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reflash/085b572b39131648c1a4db2020ad0686 to your computer and use it in GitHub Desktop.
Save reflash/085b572b39131648c1a4db2020ad0686 to your computer and use it in GitHub Desktop.
clm_1 = """...""" # column of your first table
clm_2 = """...""" # column of your second table
lines = zip(clm_1.split('\n'), clm_2.split('\n'))
new_lines = list()
for line in lines:
for item in line[1].split(','):
new_lines.add((line[0], item.strip()))
print("\n".join([x[0] for x in new_lines]))
print("\n".join([x[1] for x in new_lines]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment