listA = ["A","B","C"]
listB = ["a","b","c"]
It's okay to write
listC = [listA[0]+listB[0], listA[1]+listB[1],listA[2]+listB[2]]
But when I write
i=0
listD = []
while i < len(listA):
listD[i] = listA[i]+listB[i]
i+=1
or
i=0
listD = []
while i < len(listA):
listD[i] = str(listA[i])+str(listB[i])
i+=1
It's not okay. PLease tell me why and how to correct it. Many thanks!!