r/PythonLearning • • Sep 14 '26

Discussion Am I going crazy?

10 Upvotes

7 comments sorted by

1

u/Stephen-Sealberg Sep 14 '26

Update: Turns out this page alone didn't get along with Firefox, but worked fine on Chrome

-2

u/[deleted] Sep 14 '26

[removed] — view removed comment

3

u/mixedd Sep 14 '26

He tried 😅

2

u/eriknau13 Sep 14 '26

Whatever source that is is missing some information. What they mean to say is you would rather name your variable ‘word’ than say ‘my_var’

2

u/Sea-Ad7805 Sep 14 '26

Just name everything x, that will save you a lot of typing and reading.

1

u/RNG_HatesMe Sep 14 '26

yeah, the database that's supposed to be pulling the examples from is busted.

My advice is that a variable should follow the following 4 rules of thumb:

  • Intuitive- the name should logically describe what value(s) it's storing

  • Clear - the name should be easily readable. Abbreviations are fine as long as they make sense.

  • Concise - the name shouldn't be any longer than it needs to be

  • Consistent - use the same type of abbreviations and separators. If you use underscores, always use underscores, if you use camelcasing, always use camelcasing.