python fill list with zeros code example Example 1: make a zero list python listofzeros = [0] * n Example 2: fill zero behind number python f_num.strip().zfill(2)