python判断变量类型

mac2022-06-30  83

python中判断变量类型应该用isinstance() 而不要用type

如 n = 10 , 判断n是否为int, isinstance(n, int)

转载于:https://www.cnblogs.com/chimmu/p/6212318.html

最新回复(0)