What are the Rules and Guideliness for using Variables


#1

Hi I am new to Python and but I use Blender 3D and it has built verion 3.5.2 of Python in it so I was told to learn

Now I understand that Variables hold data like a container
but what are the do's and don't s of using them in a line of Python code?

I know a few

from anther classs

A variable name can contain only letter, number and underscores.
it should start either with a letter or an underscore.
for instance, Code_1 and code are acceptable variables name, but 1code is a Big No No No

any more that I need to know remember I new at this



Replace this line with your code.


#2

PEP 8 covers the styling for Python code and goes quite in depth about how to name different variables in different circumstances. The naming conventions section will be of the most use for this particular question. I am not sure about your IDE, but with the python plugins for Visual Studio Code it will automatically parse for different PEP requirements and tell you how to make it compliant.


#3

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