Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Data-types

There are different types of data types in Python. Some built-in Python data types are:

  • Numeric data types: int, float, complex
  • String data types: str
  • Sequence types: list, tuple, range
  • Binary types: bytes, bytearray
  • Mapping data type: dict
  • Boolean type: bool
  • Set data types: set, frozenset

Numeric Data type

  • int - holds signed integers of non-limited length.
  • float- holds floating precision numbers and it’s accurate up to 15 decimal places.
  • complex- holds complex numbers.

String Data type

The string is a sequence of characters. Python supports Unicode characters. Generally, strings are represented by either single or double-quotes

List Data type

The list is a versatile data type exclusive in Python.It can simultaneously hold different types of data.

a= [1,2,3,4,5,6]
print(a)

Tuple

The tuple is another data type which is a sequence of data similar to a list. But it is immutable. That means data in a tuple is write-protected. Data in a tuple is written using parenthesis and commas.

Dictionary

Python Dictionary is an unordered sequence of data of key-value pair form. It is similar to the hash table type. Dictionaries are written within curly braces in the form key:value. It is very useful to retrieve data in an optimized way among a large amount of data.