Lo Shu Magic Square (Python)
Your solution is hardcoded for matrices of size 3x3 - why not support matrices of arbitrary size as well? It's also difficult to maintain and debug your code, i.e., it's easy to mess up somewhere when you are indexing your rows and columns. Also, imagine you wanted to consider larger matrices: what a nightmare to now modify your existing logic!
A more robust solution could turn to numpy. Specifically, you can check row and column sums by doing m.sum() and m.sum(axis=1), and compute the sums of the diagonals via m.trace() or by sum(np.diag(m)) and sum(np.diag(np.fliplr(m)).
As a general comment, just return a boolean value from your function. Let the main program decide what do with this value, i.e., whether to print &quot;this is good&quot;, &quot;This is a Lo Shu Magic Square&quot;, or whatever. In this way, your verifier function stays clean and more generic.