counter =
100
miles =
1000.0
name =
"runoob"
print(counter)
print(miles)
print(name)
a, b, c, d =
100,
10.0,
True,
2-
4j
print(type(a))
print(type(b))
print(type(c))
print(type(d))
print(isinstance(a, int))
print(isinstance(b, float))
print(isinstance(c, bool))
print(isinstance(d, complex))
class A:
pass
class B(A):
pass
isinstance(A(), A)
type(A()) == A
isinstance(B(), A)
type(B()) == A
转载于:https://www.cnblogs.com/bilaisheng/p/10210951.html