【发布时间】:2011-08-17 18:45:17
【问题描述】:
我已经用 Python 编写了这段代码:
if type(data).__name__=='list':
print type(data).__name__
print ",".join(data)
它给了我这个错误:
print ",".join(data)
exceptions.TypeError: sequence item 0: expected string, list found
这怎么可能?!?
提前感谢您的帮助。
【问题讨论】:
标签: python list exception types