Python is a general-purpose interpreted, interactive, object-oriented high-level programming  language that supports the development and implementatio

Data Types in Python

submited by
Style Pass
2021-05-21 14:20:23

Python is a general-purpose interpreted, interactive, object-oriented high-level programming language that supports the development and implementation of a wide range of applications. It is a user-friendly language that is easy to learn and use. Python is being used in many diverse fields to build applications like system administration, GUI programs, database applications, scripting, etc.

Python offers a vast variety of data types that help in the implementation of various applications. In this article, we are going to study the basic data types of python along with their built-in functions and their use.

3) Complex – These are complex numbers specified as a real part and an imaginary part. They are stored in the form of a + bj where a is the real part and j represents the imaginary part.

>>> num1=10 >>> print(num1) 10 >>> type(num1) <class 'int'> >>> fnum=26.5 >>> print(fnum) 26.5 >>> type(fnum) <class 'float'> >>> num3=2 + 6j >>> print(num3) (2+6j) >>> type(num3) <class 'complex'> Strings

Leave a Comment