Skip to content

Instantly share code, notes, and snippets.

@dtaivpp
Last active September 7, 2019 15:47
Show Gist options
  • Save dtaivpp/bd661afcb68f8d60c63ec57751307f6a to your computer and use it in GitHub Desktop.
Save dtaivpp/bd661afcb68f8d60c63ec57751307f6a to your computer and use it in GitHub Desktop.
This is a good way to join several lines fo an array not adding punctuation to the end.
def gen_table_sql(table_obj):
# Joins all rows with a comma and a newline except for the last
query = ',\n'.join(table_obj['columns'])
return query
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment