def join_cols ( cols ) : return ", " . join ( [ i for i in cols ] ) if isinstance ( cols , ( list , tuple , set ) ) else cols
concatenate columns in python using sql
Join list of columns into a string for a SQL query
def join_cols(cols):
    """Join list of columns into a string for a SQL query"""
    return ", ".join([i for i in cols]) if isinstance(cols, (list, tuple, set)) else cols