Given the following code:
l1 = ['001', '002', '003']
print ("ID" + "\t"+ "Usr" + "\t" + "f1" +"\t"+ "f2"+ "\t"+ "f3"+"\n")
print ("12QRS" + "\t"+ "RSW123"+ "".join([ int(z) * "\t" + str(1) for z in l1])+"\n")
output is the following:
12QRS RSW123 1 1 1
The first two values are separated by one tab. The third, fourth and fifth are separated according to the elements of l1, that is, one, two and three tabs. However, this isn't accurate although the third value is truly separated by one tab, the last two values are not position at the correct place. Their should be positioning at the two and there tabs respectfully. I want to make the last two values to be writing in the correct position?