Variables
It is a storage of value for future use. In python it is a pointer of specific object in memory.
Naming convension
snake_case: variables, function, methods, modulesPascalCase: Classes (user defined. built-in classes are in lower case)slug-case: PackagesUPPER_SNAKE_CASE: Constants
Dynamic typing
python
a = 10
a = True
a = 'Kibria'
a = NoneWorking with variables
- Always choose meaningful name
- Use noun for variable name:
age,name,photo - Use verb for function name:
get_age,get_name,is_active - Use plural for sequence or list:
ages,names,photos
variable scope
todo