{"id":24858,"date":"2021-11-02T09:54:56","date_gmt":"2021-11-02T04:24:56","guid":{"rendered":"https:\/\/python-programs.com\/?p=24858"},"modified":"2021-11-02T20:14:27","modified_gmt":"2021-11-02T14:44:27","slug":"python-type-function-with-examples","status":"publish","type":"post","link":"https:\/\/python-programs.com\/python-type-function-with-examples\/","title":{"rendered":"Python type() Function with Examples"},"content":{"rendered":"

type() Function in Python:<\/strong><\/p>\n

The type() function returns the type of the object that was passed to it.<\/p>\n

Based on the arguments passed, the type() function either returns the type of the object or returns a new type object.<\/p>\n

Syntax:<\/strong><\/p>\n

type(object, base, dict)<\/pre>\n

Parameters<\/strong><\/p>\n

object:<\/strong> This is required. The type() function returns the type of this object if only one parameter is specified.<\/p>\n

base:<\/strong> This is optional. It Describes or specifies the base classes.<\/p>\n

dict:<\/strong> This is optional. Specifies the namespace containing the class definition.<\/p>\n

Return Value:<\/strong><\/p>\n

This function returns<\/p>\n