I checked similar questions in this error but none is useful here is my code :
def update(up_margin=None, margin=None, time=None, history=None, clean_type=None):
update_column = ''
columns = {'up_margin': up_margin, 'margin': margin, 'time': time, 'history': history, 'type': clean_type}
for key, value in columns:
if value is not None:
if update_column != '':
update_column += ','
update_column += '{}={}'.format(key, value)
print(update_column)
update(up_margin=100)