Skip to main content
added 50 characters in body
Source Link
xnor
  • 149.7k
  • 26
  • 287
  • 676

Python 2, 6261 bytes

i=n=input() while n+iwhile~-1n+i:i-=1;j=abs(i);print' '*j+'* '*(2*n+~j) 

Prints a trailing space at the end of each line.

Thanks to Erik the Outgolfer for saving a byte.

Python 2, 62 bytes

i=n=input() while n+i-1:i-=1;j=abs(i);print' '*j+'* '*(2*n+~j) 

Prints a trailing space at the end of each line.

Python 2, 61 bytes

i=n=input() while~-n+i:i-=1;j=abs(i);print' '*j+'* '*(2*n+~j) 

Prints a trailing space at the end of each line.

Thanks to Erik the Outgolfer for saving a byte.

Source Link
xnor
  • 149.7k
  • 26
  • 287
  • 676

Python 2, 62 bytes

i=n=input() while n+i-1:i-=1;j=abs(i);print' '*j+'* '*(2*n+~j) 

Prints a trailing space at the end of each line.