isinstance(object, classinfo)
objectの型がclassinfoにあっているかを返す
>>> print(isinstance(1, int))
True
>>> print(isinstance(1, str))
False
Go to list of users who liked
More than 3 years have passed since last update.
isinstance(object, classinfo)
objectの型がclassinfoにあっているかを返す
>>> print(isinstance(1, int))
True
>>> print(isinstance(1, str))
False
Register as a new user and use Qiita more conveniently
Go to list of users who liked