1. Comments, Indentation, pass, Case Formats ✍ - JulTob/Python GitHub Wiki
💬 Comments
# Work like this
"""Or as multiline
like this, with three quotes """
🌬 Indentation
Indentation is important in python. Determines the scope of a statement or block.
Indentation is 1 tab or 4 spaces.
To escape this you can use [],{}, or () and the following code will scope to the indentation of the parenthesis.
🙅🏻 Pass
# Placeholder for null statements
pass
Statement separator
Statements can be separated by newlines or semicolons ;
a, b, c = 6, 5, 4
print(a)
print(b);
print(c); print(a)
print(b); print(c);
Case formats
#Legal variable names:
myvar = "John"
my_var = "John"
_my_var = "John"
myVar = "John"
MYVAR = "John"
myvar2 = "John"
MyVar = "John"
My_Var = "John"
MY_VAR = "John"
#Illegal variable names:
2myvar = "John"
my-var = "John"
my var = "John"
Reccomendations:
# For variables
snake_case_variables = 1
# For Clases
PascalCaseClass
# For Functions
camelCaseFunctions
# For Processes
Pascal_Snake_Case_Function