Data Types
The type of value stored in a variable and determine the operations that can be performed on that data.
1.Numeric Data Types
It used to store numeric values
Integers(int) **
It contains positive or negative whole numbers (without fractions or decimals)
**Float(float)
It is a real number with a floating-point representation. It is specified by a decimal point
Complex(complex)
It stores numbers with real and imaginary parts
example: 2+3j
2.Sequence Data Types
A sequence is an ordered collection of items, which can be of similar or different data types. Elements in a sequence can be accessed using indexing
String(str)
used to store text data and can be created using single, double or triple quotes
List
Lists are ordered and mutable collections used to store multiple items in a single variable
Tuple
Tuples are ordered and immutable collections used to store multiple items in a single variable
3.Boolean Data Type(bool)
It represents one of two values: True or False and mostly used in conditions and in comparison operator
4.Set Data Types
unordered and mutable collections used to store unique elements
5.Dictionary Data Type
Dictionaries are used to store data in key:value pairs. Each key in a dictionary must be unique and values are accessed using their keys with square brackets [] or get() method

Top comments (0)