In: Computer Science
Python has an established coding style, but the style is a suggestion, and although you can style your code using different style choices, you are strongly encouraged to be consistent.
true or false
TRUE
Giving you the reasons why a code style need to be consistent.
A coding style is actually about consistency.
Consistency within one module or function is the most important.
However we may come across situations where we need to be incosistent.
->When applying the same consistent coding style would make the code less readable, even for someone who is used to read codes, you have to break the rules there.
Excluding these types of very rare cases, it is strongly advisable to stay consistent while even though you have the feasibility of using different style choices, this is because
1)Consistent code style makes it easy for people to understand how a program works.
2) When reading consistent code, one can form a certain number of assumptions and expectations about how the code works and hence it becomes easier and safer to make modifications to it.
3)If there is same coding style for two different codes, then one can make changes to it easily without effecting any other things in that particular code.
4) When a group of people are working on the same code, It makes easy for all the people in that group in understading and developing the code if they follow code consistency.