Python & Data Structures Part 2: type() Keyword



This content originally appeared on DEV Community and was authored by Anthony Beckford🚀

Today’s short lesson is about type() function in Python

the type() is a built-in function in Python that returns the type of an object.

Here are some example of how the type() function works:

`type(5)
<class 'int'>

type("Anthony")
<class 'str'>

type({age:10})
<class 'dict'>

The purpose is to return the type of an object

Stay tune for Part 3 Coming Soon!


This content originally appeared on DEV Community and was authored by Anthony Beckford🚀