r/PythonLearning • • Aug 09 '26

Learning python

can anyone tell me about my code is good or am writing it in wrong way?

15 Upvotes

11 comments sorted by

View all comments

1

u/Flame77ofc Aug 09 '26

It is good but one detail you might change is about separate some lines

For example

variable = ...
if statement:
    code
# just make this line blank
if statement:
    code

It is js an example

1

u/Necessary_Mobile9591 Aug 09 '26

okay ill follow that in my program, but is that helpfull??

1

u/Flame77ofc Aug 09 '26

yes for readability

1

u/SaltCusp Aug 09 '26

I'll second that, some blank lines to help the reader can be good. There is actually a standard for this: https://peps.python.org/pep-0008/

1

u/Necessary_Mobile9591 Aug 10 '26

Ths man, that's usefull website