#-*-coding:utf-8-*-#python#Xiaodeng#python's function Usage isinstance ()#isinstance ()#Description: Returns a Boolean value that determines the data type" "isinstance (...) Isinstance (object, class-or-type-or-tuple), BOOL object: An object Class-or-type-or-tuple: Class/base type/tuple, can pass only one data type, or you can Pass multiple data types bool: Returns a Boolean value of return whether an object was an instance of a class or of a subclass thereof. With a type as second argument, return whether this is the object ' s type. The form using a tuple, isinstance (x, (A, B, ...)), is a shortcut for isinstance (x, a) or isinstance (x, B) or ... (etc.)." "#CaseObject=range (5)#ListPrintIsinstance (Object,tuple)#FalsePrintIsinstance (Object,list)#TrueObject='Xiaodeng'PrintIsinstance (object, (Str,int))#True, passing multiple data types at the same timePrintIsinstance (object, (Str,int,list))#True, passing multiple data types at the same time
Python's function Usage isinstance ()