我有以下代码:
heList = open(self.IAM_he_List, 'r')
appsList = open(self.IAM_appsList, 'r')
resultsFile = open(self.IAM_Tests_Results, 'w')
for line in heList:
__splitLine = line.split(',')
heNum = __splitLine[0]
roleName = __splitLine[1].rstrip()
for app in appsList:
resultsFile.writelines(heNum + "," + roleName + "," + app.rstrip() + "," + "," + "," + "\n")
我希望它为每个外循环遍历一个内循环,但是似乎内循环只执行一次。我想我在这里缺少一些基本的东西。有任何想法吗?