Skip to main content
added 22 characters in body
Source Link
mdahmoune
  • 3k
  • 2
  • 15
  • 28

Python 2, 174 164164 154 bytes (based on matrix operations)

-10 bytes thanks to ngn.

  • -10 bytes thanks to ngn.
  • -10 bytes thanks to Jonathan Frech.
from numpy import*
s=[['#']]
exec'b=fliplr(s);s=vstack((hstack((flipud(s),b)),hstack((eye(len(s)),rot90(b)))));'*6
s[s>'#']=' ';print'\n'.join(''.join(l)'
for l in s:print''.join(l)

Try it online!Try it online!

Python 2, 174 164 bytes (based on matrix operations)

-10 bytes thanks to ngn.

from numpy import*
s=[['#']]
exec'b=fliplr(s);s=vstack((hstack((flipud(s),b)),hstack((eye(len(s)),rot90(b)))));'*6
s[s>'#']=' ';print'\n'.join(''.join(l)for l in s)

Try it online!

Python 2, 174 164 154 bytes (based on matrix operations)

  • -10 bytes thanks to ngn.
  • -10 bytes thanks to Jonathan Frech.
from numpy import*
s=[['#']]
exec'b=fliplr(s);s=vstack((hstack((flipud(s),b)),hstack((eye(len(s)),rot90(b)))));'*6
s[s>'#']=' '
for l in s:print''.join(l)

Try it online!

added 8 characters in body; edited body
Source Link
mdahmoune
  • 3k
  • 2
  • 15
  • 28

Python 2, 174174 164 bytes (based on matrix operations)

-10 bytes thanks to ngn.

from numpy import *import*
s=[['#']]
exec'b=fliplr(s);s=vstack((hstack((flipud(s),b)),hstack((eye(len(s)),rot90(b)))));'*6
s[s>'#']=' ';print'\n'.join(''.join(l)for l in s.tolist())

Try it online!Try it online!

Python 2, 174 bytes (based on matrix operations)

from numpy import *
s=[['#']]
exec'b=fliplr(s);s=vstack((hstack((flipud(s),b)),hstack((eye(len(s)),rot90(b)))));'*6
s[s>'#']=' ';print'\n'.join(''.join(l)for l in s.tolist())

Try it online!

Python 2, 174 164 bytes (based on matrix operations)

-10 bytes thanks to ngn.

from numpy import*
s=[['#']]
exec'b=fliplr(s);s=vstack((hstack((flipud(s),b)),hstack((eye(len(s)),rot90(b)))));'*6
s[s>'#']=' ';print'\n'.join(''.join(l)for l in s)

Try it online!

Source Link
mdahmoune
  • 3k
  • 2
  • 15
  • 28

Python 2, 174 bytes (based on matrix operations)

from numpy import *
s=[['#']]
exec'b=fliplr(s);s=vstack((hstack((flipud(s),b)),hstack((eye(len(s)),rot90(b)))));'*6
s[s>'#']=' ';print'\n'.join(''.join(l)for l in s.tolist())

Try it online!