def p(x,c): s='' for i in range(x): s+=c print(s,end='') def l(e,c,n): for i in range(n): p(e,' ') p(c,'*') print() l(4,2,2) l(3,4,7) l(0,10,3)