Table of Contents for this Page
- Common Variable types
- Python’s built in type function
- Naming Conventions for Variables (snake vs camel case)
Python supports the basic types of variables that you would expect from a general purpose language. These are listed below.
Example Code 1
Python does classify each variable’s datatype based on its value. You can always check the data type of a variable by using the Python function type as shown in code below.
Example Code 2
As example code 2 shows, can see above, the type function returns the datatype of a variable. Maybe you’re wondering why there’s even a need for the type function…we will talk more about that soon.