It’s hard to get what the problem is here if you only paste in your code. So please add some explanation of why you created this discussion. Also, I’d recommend using codeblocks 3  as it makes the code a lot more readable and also please try to keep the correct indentation of the code as Python code is hard to read otherwise.