如果a = 'fefe'
bin(a)
输出的结果:
Traceback (most recent call last):
File "test.py", line 3, in <module>
print bin(a)
TypeError: 'str' object cannot be interpreted as an index
如果a = 'fefe'
bin(a)
输出的结果:
Traceback (most recent call last):
File "test.py", line 3, in <module>
print bin(a)
TypeError: 'str' object cannot be interpreted as an index