Skip to content

Instantly share code, notes, and snippets.

@Gwith
Created August 11, 2016 15:36
Show Gist options
  • Select an option

  • Save Gwith/e5569e7cfa7baee95e3aa8ad94f6a135 to your computer and use it in GitHub Desktop.

Select an option

Save Gwith/e5569e7cfa7baee95e3aa8ad94f6a135 to your computer and use it in GitHub Desktop.
tableData=[['apples', 'oranges', 'cherries', 'banana'],
['Alice', 'Bob', 'Carol', 'David'],
['dogs', 'cats', 'moose', 'goose']]
newTable = { 0:[], 1:[], 2:[], 3:[] }
for list in tableData:
for element in range(len(list)):
newTable[element].append(list[element])
print(newTable)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment