我正在尝试创建一个函数,例如:
RotateElement (doc, lmnt_id, axis, angle)
lmnt_id
、axis
和angle
是以列表形式出现的输入。例如:
axis = [line1, line2, line3]
angle = [20, 25, 30]
lmnt_id = [1, 2, 3]
doc is a constant value
我如何调用这个函数以便它遍历输入。我希望它第一次运行时使用第1行、第20行和第1行,第二次运行时使用第2行、第25行和第2行,以此类推。我试过这个,但只运行过一次:
for i in lmnt_ids:
lmnt_id = i
for j in axises:
axis = j
result.append(ElementTransformUtils.RotateElement (doc, lmnt_id, axis, angle))
谢谢你!你知道吗
看起来你想要:
^{} 将匹配这三个列表,并将每个列表的第
n
个值依次分配给循环变量相关问题 更多 >
编程相关推荐