Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python

For loop

 

 

Python python RSS feed   Index | Next | Previous | View Threaded


shahviral.it at gmail

Apr 30, 2012, 3:41 AM

Post #1 of 1 (162 views)
Permalink
For loop

Hi

I want to make a pattern like this

*1
22
333
4444
55555
*
and I did the following code,

*for i in range (5):
for j in range (i):
print i
print " "*

got the output :
*
*

*1

2
2

3
3
3

4
4
4
4*


What's I'm not doing right, please let me know about this

Python python RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.