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