20230726_010258 体验字符串数据类型 python 目标 定义字符串 查看字符串的类型 字符串不能够算术运算 字符串可以进行拼接 示例 >>> s = "6" >>> type(s) <class 'str'> >>> s + 1000 Traceback (most recent call last): File "<pyshell#2>", line 1, in <module> s + 1000 TypeError: can only concatenate str (not "int") to str >>> s '6' >>> s + "hello" '6hello'