Variables


Variables do not have to be explicitly declared.


You can check the date type of a variable using the functions type() and isinstance()


Variables are case sensitive


Variable Naming Convention
cannot start with a number
can contain the underscore character (no other characters)
use "snake case"

__54__ 
one_two

Variables that are defined as parameters or within a function live until the function ends.
These are local variables.




Assigning Multiple Values


x, y, z = 'one','two','three'  
print(x)
print(y)
print(z)



num1 = 2 
num2 = 6
sum = num1 + num2
print(sum)


A variable should start with letters or underscores (no numbers or special characters)

1var_ = 1   ' syntax error  




© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopNext