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 9564KB
stdin
Standard input is empty
stdout
1 
1 1 
1 2 1 
1 3 3 1 
1 4 6 4 1 
1 5 10 10 5 1 
1 6 15 20 15 6 1