A variable is a name which is used to reserve space in memory for storing values.
A variable in Python is created when we assign a value to it.
name = "Danny" contact_number = 987654 amount = 150.60 status = True print(name) print(contact_number) print(amount) print(status)
Python is dynamically typed programming language, meaning we do not need to declare data type of a variable. The type of a variable can also be changed by reassigning a new value of another type to already declared variable.
name = "Danny" name = 987654 print(name)
Use small letters and in case of multiple words, separate words by underscore to improve readability.
user_name = "Danny" color = "Red" _customer_email = "firstname.lastname@example.org" x = 100