How do you write clean, yet readable Python code?

preview_player
Показать описание

"How do you write clean, yet readable Python code?"

* * *

FREE Python Coding Tutorials & News:
Рекомендации по теме
Комментарии
Автор

Depends on how you code. Imperative, write flowcharts, then code. OOP, write top down design, then code. Functional, write formulas, then code. Think visually first. Iterate, make it work, then optimize last. 1. First working program, 2 coders, 8 months, 600 lines of code., ran in 45 minutes. Refactored in 12 hours to 200 lines, ran in 6 minutes. Mostly vectorized it and removed loops. Optimize last!

harveysummers
Автор

I save a lot of time by adapting existing code to create new functionalities, I have the luck that my colleagues are senior :)

roshcoben
Автор

I think its very important to know what you want to do and plan ahead a few steps. And maybe follow and understand coding standards like PEP8. This will help making the code better readable in some points. Off course the writing itself need to be done anyway. There are a few Python features and constructs that can help writing cleaner code too, but you need to know and learn to use them first.

thingsiplay
Автор

How could i able to learn text recognition using python

AnilKumar-heei
Автор

Which code will be called clean and best...
1.The code which is good in readability...
2.The code having minimum numbers of line..
3.or it should have both the quality

prabhakarsingh