7.3 并且想知道为什么在以下示例中字符串“racecar”被视为 int 类型。提前感谢您的帮助
>>> s = "racecar"
>>> for i in len(s):
print(s[i])
Traceback (most recent call last):
File "<pyshell#9>", line 1, in <module>
for i in len(s):
TypeError: 'int' object is not iterable