What are the basic data types in Python

Get to know basic data types

Python supports five basic numerical types, three of which are integer types.


int      (signed integers)
long     (long integers)
bool     (Boolean values)//from ww w . j a  v  a  2s . c  o m
float    (floating point real numbers)
complex  (complex numbers)

Here are some example literal.


int      0101     84   -237     0x80 017 -680 -0X92
long     29979062458L  -84140l  0xDECADEDEADBEEFBADFEEDDEAL
bool     True          False/* w  w w .j a  v a2s  . c  om*/
float    3.14159       4.2E-10      -90. 6.022e23          -1.609E-19
complex  6.23+1.5j     -1.23-875J   0+1j 9.80665-8.31441J  -.0224+0j




















Home »
  Python »
    Data Types »




Data Types
String
String Format
Tuple
List
Set
Dictionary