如何检查变量的类型是否为字符串? - How to check if type of a variable is string?

问题:

Is there a way to check if the type of a variable in python is string. 有没有办法检查python中的变量类型是否为字符串。 like: 喜欢: python

isinstance(x,int);

for integer values? 对于整数值? spa


解决方案:

参考一: https://stackoom.com/question/KJvh/如何检查变量的类型是否为字符串
参考二: https://oldbug.net/q/KJvh/How-to-check-if-type-of-a-variable-is-string
相关文章
相关标签/搜索