Python, list of strings, rows into columns
<p>So, my problem is, i want to transpose my list rows into columns
for example: </p>

<p>["AAA", "BBB", "CCC"] => ["ABC", "ABC", "ABC"]</p>

<p>can't find an efficient way to do it.</p>

<p>So this assumes that you are dealing with strings in your example, but you could expand the algorithm for dealing with whatever data type you come across, the logic will remain the same.</p>

<pre><code>listRows = ["AAA", "BBB", "CCC"]
transList = []
tempString = ''
for s in range(0,len(listRows)):
    for i in range(0, len(listRows)):
        tempString = tempString + listRows[i][s]
    transList.append(tempString)
    tempString = ''
print(transList)
</code></pre>

<p>Where transList is the final list you want</p>

python