function 3

callable(object) Determines whether the object is callable

getattr(object,name[,default]) Get the value of the attribute, and also provide a default value

hasattr(object, name) Determines whether the object has the specified attribute

isinstance(object, class) Determines whether the object is an instance of the specified class

issubclass(A, B) Determines whether A is a subclass of B

random.choice(sequence) randomly selects an element from a non-empty sequence

setattr(object, name, value) sets the specified attribute of the object to the specified value

type(object) returns the type of the object

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325351091&siteId=291194637