For loop

Terry Reedy tjreedy at udel.edu
Mon Apr 30 14:55:31 EDT 2012


On 4/30/2012 6:41 AM, viral shah wrote:
> Hi
>
> I want to make a pattern like this
>
> *1
> 22
> 333
> 4444
> 55555

Python 3:
 >>> for i in range(1,6): print(i*str(i))

1
22
333
4444
55555

-- 
Terry Jan Reedy




More information about the Python-list mailing list