Python Language / Python VariablesIt is a name used to store a value and no need declare the variables for its types in python.Initialization of variables Giving value to variables is called Initialization of variables. Example x = 9 y = "wisdom materials" Rules for Python variables 1. It must start with a letter or the underscore character. 2. Its name cannot start with a number. 3. Its name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _). 4. Variable names are case-sensitive (age, Age and AGE are three different variables). Output Variables Python print statement is used to output variables.To combine text and a variable it uses the + character.
Types of Python Numbers 1. int. 2. Float. 3. Complex. Variables of numeric types are created when you assign a value to them.
|