In this tutorial, we will learn about python data types
A data type is a classification of one of a variety of types of data, such as Number, Boolean, Strings and so on. Data types determine the possible value for the type. If an operation is done then it can be done on the value of that type.
Python has many native datatypes that are listed as in the following:
- Boolean: True or False
- Integer: Positive and Negative values like -1,-2, 0, 2, 8 and so on.
- Float: 0.2, 2.8 and so on.
- Fraction: 3/5, 2/7 and so on.
- Complex: Values that have a real part and complex part like 2 + 3i.
- String: String is the sequence of Unicode characters
- Byte, and Byte Array: This data type can save any binary files like Image(jpg, png, bmp and so on. )
- List: An Ordered sequence of value.
- Tuples: Ordered immutable sequence of value.
- Sets: An Unordered bag of values or Objects.
- Dictionaries: Unordered bags of key-value pair.