Python learns to do these ten good habits, and the monthly salary of employment is as high as 80,000

Python is a beautiful language that can inspire users to love it. So if you are trying to join the ranks of programmers, or you are a little tired of C++, Perl, Java and other languages, I recommend you to try Python.
Python has many features that appeal to programmers. It is easy to learn, object-oriented, bytecode compilation, free and Open source. There are also runtime checks. Complete and fast support, can perform various task extensions.
Efficient Python

In this article, I want to highlight some aspects of Python that can save time and maximize productivity. In preparation, I consulted several Pythonists. What are their most time-saving techniques? The answer is here...
1. Do not use semicolons

Using semicolons is optional in Python. Compared with other object-oriented languages, you don't need to use semicolons after each statement.
This seems very simple, and it does not seem to save much time; but once your code size expands to thousands, these semicolons become distracting and there is no need to type.
2. Find a good code editor

Choosing a good code editor can save a lot of time. Faced with so many code editors, many novices will feel very confused.
Getting used to one editor and then using other editors can feel very confusing, so picking a good one is a good starting point. No matter which one you choose, flake8 and PEP8 must be supported in real time.
For the editor selection guide, please refer to the article Which Code Editors Do Pythonists Use?
3. Follow the Python code specification
Following the Python code specification can improve the readability of the code, thereby saving time for reviewing the code. (Python's design philosophy emphasizes the readability of the code.)
4. Use the help() function

Python's help() is a readily available built-in function that can save a lot of time, such as finding explanations of other functions. You can run this function directly in the interpreter terminal.
The Python documentation has more usage of this function.
5. Using libraries

Python has a large number of libraries that will save you from having to reinvent the wheel every time.
For example, you can select a large number of available packages from PyPI (Python Package Index), which is a software repository. Scikit-image is a good example, it enables image processing tasks such as blurring, enhancing contrast, and zooming with only a few function calls.
6. Using Cookiecutter
Cookiecutter is a command line tool that can help you create Python projects from project templates, which can save a lot of time.
7. Strict comments.
Develop a good habit of writing comments, which can save you and others time, especially for debugging and tracking. (Yes, we hear a lot, but it seems that many programmers still need to be reminded).
Annotation is very critical in teamwork, especially one that has made a lot of changes.
8. Test often
Try to test every component in your program. It sounds like a bit time-consuming, but long-running can save a lot of time, help you find hidden bugs, make you more comfortable with the code, and force you to understand how each piece of your code runs in real situations.
REPL is a read-eval-print loop, a commonly used code testing tool, and many Pythonists use it.
9.
Both dedicated and professional Pythonists suggest to have a field of focus and expertise. You can use Python to do a lot of things, from writing web cameras to processing calculations and algorithms. 
There are already a large number of libraries that can help with these tasks, such as SimpleCV, computer vision processing; Biopython, a biological computing library; SymPy, a mathematical symbolic computing library.
Going deep into these areas and mastering a specific framework will help you learn Python at a deeper level, master a specific code style (mentioned in the third part), and deal with specific types of problems.
10. Coding every day
When you develop the habit of writing python code every day and using python to solve problems, you will start to think in python, so to speak, this will eventually help you solve problems faster.

Summary
In this short article, I have listed the main tips I collected from conversations with python developers. The following are other tips that I can add.
Participate in python activities and gatherings, guarantee Attend every event and assembly you can attend. They are good for sharing experiences, best practices, tools and other interesting topics.
This may not be an easy strategy on the surface, but learning from other people's experiences through suggestions, hints, and cracking is another way to avoid reinventing the wheel.
The annual PyConf is a good place to learn about events.
Thinking

on paper Thinking on paper — doing this before diving directly into the code — will give you the flexibility to make changes. Just writing the code will force you to think about the details of the implementation from the beginning, which is often not the best use of your time when starting a project. Thinking on paper is good for brainstorming and problem-solving! The
above are the ten good habits that I want to share. I hope I can help you.

end:

I am a python development engineer, and I have compiled a set of the latest python system learning tutorials, including basic python scripts to web development, crawlers, data analysis, data visualization, machine learning, and interview books. Those who want these materials can pay attention to the editor, add Q skirt 851211580 to pick up Python learning materials and learning videos, and online guidance from the Great God!

Guess you like

Origin blog.csdn.net/pyjishu/article/details/105434946