List the basic supported data types
Computer Science is all about data
-- exporting it, processing it, loading it, etc. Each piece of data has a type
. For example, if we have a number, then its type is numeric
. This identification is useful while programming to mentally categorize different objects.
Python supports multiple data types, and each has its own syntax and significance. The following are the main forms of data, and each is broken down into other type
s.
- Numeric data
- Text data
- Boolean data
Let's dive into each one.
Note: In dynamically-typed languages like Python, we don't declare types explicitly. We create a variable and can immediately assign data to it. The interpreter then determines the intrinsic type. If you ever wanted to know the data type of an object, you can use type()
function.