Python Data Types

Data types are the classification or categorization of data items.
Python supports the following built-in data types.

Name Types
Text Type str
Numeric Types int, float, complex
Sequence Type list, tuple, range
Mapping Type dict
Set Type set, frozenset
Boolean Type bool
Binary Type bytes, bytearray, memoryview
None Type NoneType

Python Strings

Python string are the data type which are surrounded by either single quotation marks, or double quotation marks.
'Hello World!' and "Hello World!" both are same.

We can print string by python print function.

Print("Hello World!")
Output: Hello World!
Want to read more about string and its operations. Check out this article :: Python Stings

Python Numbers

Python numbers are numeric data type.
Python has three numeric data type.

  • int
  • float
  • complex
Print(type(5))
Output: <class 'int'>
Want to read more about numbers and its operations. Check out this article :: Python Numbers

Python Boolean

Python boolean data type are True/False.

Python Sets

Want to read about set and its operations. Check out this article :: Python Sets

Python Lists

Want to read about list and its operations. Check out this article :: Python Lists

Python Dict

Want to read about dict and its operations. Check out this article :: Python Dict