• Indentation

The OP has code that should be indented but isn’t, and they don’t seem to understand the whole issue of indentation in Python. The link is to a fairly thorough canonical Q & A.