Skip to content

Instantly share code, notes, and snippets.

@toloco
Last active January 6, 2017 11:22
Show Gist options
  • Save toloco/8ecce13a27358fb38bb7c68c6f79a13c to your computer and use it in GitHub Desktop.
Save toloco/8ecce13a27358fb38bb7c68c6f79a13c to your computer and use it in GitHub Desktop.
def results(a_list, columns):
for row in a_list:
yield {k: v for k, v in izip(row, columns)}
my_generator = results(result, columns)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment