Depending on the requirement, programming languages offer wide variety of data types to suit the programmers’ needs.
Below are some basic data types available in Python:
1. Integer
2. Floating-Point Number
3. String
4. Boolean
Integer
Integer is a data type used to define integer variables. Integers can be of any length. They can be any positive or negative whole number.
Floating-Point Number
A floating-point number in Python is used to define decimal numbers and is accurate up to 15 decimals places.
String
A string in Python is a sequence of Unicode characters. It is used to define any form of strings ex. Text, Alphanumeric etc. In Python, we can use single quotes, double quotes or triple quotes to define strings. Multi-line strings in Python can be represented using triple quotes.
Boolean
Boolean data in Python is used to define Boolean variables. Boolean variables can hold only two values in it, either “true” or “false”.