Creates a magic square by randomly generating a list until the list happens to be a magic square

Creates a magic square by randomly generating a list until the list happens to be a magic square. Done as simply as possible…

Why?

  • I wanted to remake a homework assignment I did two years ago, in one line of code

How long did this take you?

  • About an hour [but making this file is only adding to the amount of time wasted]

Does this even work?

How does it work?

  • I’m glad you asked. To be honest, I’m not sure I even know. But I split it up and added comments if that helps.