I have two lists and I want to concatenate them element-wise. One of the list is subjected to string-formatting before concatenation.
For example :
b = ['asp1', 'asp1', 'asp1', 'asp1', 'asp2', 'asp2'] aa = [0, 1, 5, 6, 10, 11] new_list =[] if len(aa) != len(b): print 'list length mismatch' else: for each in range(0,len(aa)): new_list.append(b[each] + str(aa[each])) print new_list