DEV Community

Cover image for Python & Data Structures Part 2: type() Keyword
Anthony Beckford🚀
Anthony Beckford🚀

Posted on

Python & Data Structures Part 2: type() Keyword

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'>
Enter fullscreen mode Exit fullscreen mode

The purpose is to return the type of an object

Stay tune for Part 3 Coming Soon!

Top comments (0)