Variables and Operators in Python
VARIABLES Creating variables Variables are a container for storing the data values. Unlike other programming, languages python has no command for declaring a variable. A variable is created the moment you first assign the value to it. Code: x = 5 y = "john" print(x) print(y) Variables do not need to be declared with any particular type and can even change type after they have been set. String variables can be declared either by using single or double quotes: a = "John" # is the same as b = 'John' Variable Names A variable can have a short name (like x and y) or a more descriptive name (age, car_name, total_volume). Rules for Python variables: A variable name must start with a letter or the underscore character A variable name cannot start with a number A variable name can only contain alpha-numeric characters and underscores (A-z, 0-9, and _ ) Variable names are case-sensitive (age, Age, and AGE are thr...