python3 判断对象是否为string

print(isinstance('abc',str))
True

print(isinstance(1,str))
False

你可能感兴趣的:(后端)