How to convert code from python to julia. the magic squares

Welcome to Julia!

Please read: make it easier to help you (especially the part about quoting code)

And do you really want help converting Python code to Julia, or do you want someone to convert this Python code to Julia for you? If it’s the former, try to identify what parts you need help with and ask specifically about those. Maybe try and show how it’s going. If it’s the latter, ask a bit more honestly (“Can someone please transpile this for me?”) and be prepared that not many have the time and interest to perform that service for free, so you could be waiting a long time for a response.