Okay, let me give you some advice on the way you should write your Python applications. From what I've learned so far as a programmer, I will provide you with some basic best practices, which I have learned while writing Python code over the past five years. Let's go into the file from the previous lecture, my threads dot p y. And let me add a few things. First, as I said earlier in the course, one crucial thing to be careful about is indentation. You should always be consistent about indentation, I would advise you to use the tab key pressed once for one level of indentation.
I always use it in my code and haven't had a problem until now. Another thing to keep in mind is that you should always write your import statement at the beginning of the file before any other lines of code. Now, maybe the biggest advantage of Python is the readability of the code. That's why you should keep your code as readable and as clean as possible. For example, each time you create a variable and assign it a value, it's better to leave a space between the equal sign and the characters you type in on the left and on the right side of the equal sign. Another thing that might make your code more readable, is leaving a blank line between functions, classes, or any other code blocks.
Doc strings might also help you when you have a large program and you want to have some help available. Feel free to add doc strings to functions, classes, or even class methods. If you feel the need for any comments anywhere inside your code, use the hash sign for single line comments like this, and triple quotes for multi line comments. They will help you six months later when you return to your code. Trust me on that. You can't imagine how easy it is to forget what your own code does after several months or a year.
Of course, this is applicable for larger programs. Also, try to name your variables, functions or classes as suggestive as you can, thinking about what that particular function or class does. For instance, if you have a function that simply adds two numbers, name it some x y instead of function one. Okay, I know this is a very basic example, but you got the point. I encourage you to read the entire list of best practices for coding in Python using the link I have attached to this lecture. Just keep in mind that keeping your code clean, readable and compliant will help you a lot in your coding adventures.
I hope that helps.