我试图用python编写脚本。我需要避免重复同样的任务,我想写一个。在
catlist1 = ['s0.05-k5-a1.0' , 's0.05-k5-a3.0' , 's0.05-k5-a7.0' , 's0.05-k5-a10.0' ]
catlist2 = ['s0.05-k7-a1.0' , 's0.05-k7-a3.0' , 's0.05-k7-a7.0' , 's0.05-k7-a10.0']
catlist3 = ['s0.07-k5-a1.0' , 's0.07-k5-a3.0' , 's0.07-k5-a7.0' , 's0.07-k5-a10.0' ]
catlist4 = ['s0.07-k7-a1.0' , 's0.07-k7-a3.0' , 's0.07-k7-a7.0' , 's0.07-k7-a10.0']
catlist = [catlist1 ,catlist2 ,catlist3 ,catlist4 ]
我需要调用for循环中的每个列表。我调用这个循环中的所有列表。我可以通过在catlist1和catlist2中为我写多次来重复。。 我怎么能解决这个问题呢。谢谢
^{pr2}$
您要做的是,展开嵌套列表。你可以这样做
相关问题 更多 >
编程相关推荐