【发布时间】:2025-12-03 05:10:01
【问题描述】:
我试图在 for 循环中遍历 2 个相同长度的数组,但我得到了一个
ValueError:解包的值太多
这是产生错误的代码:
test = [1, 0, 5, 2, 6, 3, 4]
names = ['patient_map_id', 'birth_date', 'age_in_years_num',
'sex_cd', 'vital_status', 'event_map_id', 'start_date']
for col_num, name in (test, names) :
#do stuff
如果我没记错的话,应该有办法做到这一点,但我看不出错误来自哪里
【问题讨论】:
-
意思是“性代码”。对于“M”或“F”
标签: python arrays python-2.7