[Solved] Parse array of elements


        #Updating code snippet by leplatrem

        result = {'44': ['2', '4'], '41': ['1', '2', '3']}

    for (k,v) in result.viewitems():
        temp_list = [str(i) for i in v]
        temp_str = ",".join(temp_list)
        temp_str = "'" + temp_str + "'"
        print "UPDATE myTable SET myColumn={} where id={}".format(temp_str,k)

#Output

UPDATE myTable SET myColumn='2,4' where id=44
UPDATE myTable SET myColumn='1,2,3' where id=41

2

solved Parse array of elements