It is best to avoid posting code as pictures or screen captures. Instead, post it as formatted text, so that we can copy, paste and execute it for testing.
Please see Python Discourse Quick Start for useful information about this forum. In particular, take a look at How do I post code snippets, error messages etc? on that page for advice on how to properly format code and output for posting.