print temp1[int(i0*len(temp1)),:int(i1*len(temp1))]
这是错误
2017-02-06T11:41:57.72+0200 [APP/0] ERR TypeError: list indices must be integers, not tuple
答案 0 :(得分:0)
冒号之前有一个逗号。工作代码(假设变量设置正确)应为:
print temp1[int(i0*len(temp1)):int(i1*len(temp1))]