When I am typing a variable to equal something do I want to have spaces between the variable and the equal sign?
Ex: cats = 3 or cats=3
Does it matter either way? I want to make sure I am learning everything the correct way so I don't start to form bad habits.

Thank you!



I saw this post, and I was wondering about it earlier. I tested both, and either one worked. I also asked a family member for a second opinion (they code/program for a living) and they agreed, although they said that in general they preferred cats = 3. (with spacing)

I hope this helps you~


PEP8 is the generally accepted python style guide and much of it applies to most other languages as well so go ahead and read it/use as reference


Thank you! It does help!


Thanks for the great suggestion! I will definitely use this as a tool!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.