~ python3.6
Python 3.6.7 (v3.6.7:6ec5cf24b7, Oct 20 2018, 03:02:14)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> a = "abcefghigklnmopqrstabcefghigklnmopqrstabcefghigklnmopqrstabcefghigklnmopqrst"
>>> b = "abcefghigklnmopqrstabcefghigklnmopqrstabcefghigklnmopqrstabcefghigklnmopqrst"
>>> a is b
True
你好,Bobby老师,关于字符串我在交互环境测试了一下
```
~ python3.6
Python 3.6.7 (v3.6.7:6ec5cf24b7, Oct 20 2018, 03:02:14)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> a = "abcefghigklnmopqrstabcefghigklnmopqrstabcefghigklnmopqrstabcefghigklnmopqrst"
>>> b = "abcefghigklnmopqrstabcefghigklnmopqrstabcefghigklnmopqrstabcefghigklnmopqrst"
>>> a is b
True
```
发现很长的字符串只要相等,他们的就是指向的同一个对象