How to assign a value to a alias in a loop

后端 未结 0 876
天涯浪人
天涯浪人 2021-01-22 19:16

If the variable is a list, I want to assign the first element in that list to the variable\'s alias. The following does NOT work.

a = 1
b = [2]
L = [a,b]
for x i         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题