判断是否是字符串

a =
b = ""
print(isinstance(a,str))
print(isinstance(b,str))
False
True

判断是否是列表

a = [,,,]
b = ""
print(isinstance(a,list))
print(isinstance(b,list))
05-23 14:56