Data types are kept easy.

There are certain data types in python and they’re called integers, floats, boolean, complex, strings, and built-in functions. Here, we’ll be underlining the data types in python.

Integers

Ints or integers, both are positive and negative whole numbers without a decimal point. They’re either ints (signed integers) or long (long integers that have unlimited size denoted with uppercase or lowercase L). For example, 9 is an integer or int and a long is 44L.

Floats

Floats are integers that have decimal point with positive or negative values can be used for scientific notation. For example, 9.2 can be assigned as a floating-point number in python.

Booleans

The boolean data type is where you check whether your function is true or false. They’re generally used for checking the statements.

Complex

The complex data type is used to represent imaginary numbers in python. For example, 4+5j can be used as a complex number in python.

Strings

Strings are simply sequences of character data being called as str in python. They can be used either single or double and as long as you have the memory, you can use as many as you like.

#python #basic-python #programming #python-programming #data-types-in-python

Data Types in Python
2.15 GEEK