Python type()


predefined function type() का python में variables का type जानने के लिए किया जाता है।

Python type() Syntax

type(object)
  1. object | required : function में pass किया गया argument है जिसका type के बारे में पता करना है , यह argument required होता है।

Python type() Example

print( type("String") ) #string. print( type(2) ) #int. print( type(4.6) ) # float. print( type((23,34)) ) #tuple. print( type({23,34}) ) #set. print( type([23,34]) ) #list. print( type({"name":"rahul", "age":23}) ) #dictionary.

Hey ! I'm Rahul founder of learnhindituts.com. Working in IT industry more than 5.5 years. I love to talk about programming as well as writing technical tutorials and blogs that can help to others .... keep learning :)

Get connected with me - LinkedIn Twitter Instagram Facebook