rows = [(747652126187978752, 'NULL', 'NULL', 'NULL', '2020-11-03 18:46:57')]
alr_exist2 = []
ex = 0
for row in rows :
ex = row
alr_exist2.append(ex[0])
ex = 0
print(alr_exist2)
如果我运行上述代码,我需要以下输出:
[747652126187978752, 'NULL', 'NULL', 'NULL', '2020-11-03 18:46:57']
我如何修复错误
Tags:
输出
^{} 也是一个很好的pythonic解决方案
输出
您只需将其展平:
输出:
相关问题 更多 >
编程相关推荐