Python & Data Structures Part 2: type() Keyword

Anthony Beckford🚀 - Oct 10 - - Dev Community

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!

. . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player