Python – Data Types

Python comes with the following built-in data types:


You can find all my latest posts on medium.


  1. integer
  2. floating points
  3. null object
  4. boolean (true/false)

You can find the type of variable using the “type()” builtin function:

=>=>=> x = 10
=>=>=> type(x)
<class ‘int’=>
=>=>=> y = 10.2345
=>=>=> type(y)
<class ‘float’=>
=>=>=> z = "hello world"
=>=>=> type(z)
<class ‘str’=>

As you can, python automatically recognised that automatically assigns a type, after it evaluates it.