fork download
  1. rows = 5
  2. for i in range (0,rows):
  3. for j in range (0,i+1):
  4. print("*", end=' ')
  5. print("\r")
  6.  
  7. for i in range (rows,0,-1):
  8. for h in range (0,i-1,1):
  9. print("*", end=' ')
  10. print("\r")
  11.  
Success #stdin #stdout 0.03s 9064KB
stdin
Standard input is empty
stdout
* 
* * 
* * * 
* * * * 
* * * * * 
* * * * 
* * * 
* * 
*