注册 登录
编程论坛 Python论坛

请教下为什么遍历中的列表不可调用,求解释及解决的方法

liufusi 发布于 2019-04-19 15:24, 1365 次点击
import xlrd
exc= xlrd.open_workbook(r'D:\测风数据2.xls')
table= exc.sheet_by_name(u'好的')
col1= table.col_values(2)
col1.pop(0)
col2= table.col_values(4)
col2.pop(0)
a=col1
b=col2
n=len(a)
d={}
for i in range(n):
    if i <n:
        d[a(i)]=b(i)
print(d)
0 回复
1