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>You can do a simple use of <code>zip</code> and unpacking:</p>

<pre><code>strs = ["AAA", "BBB", "CCC"]
print zip(*strs)
</code></pre>

<p>Output will be tuples, though:</p>

<blockquote>
  <p>[('A', 'B', 'C'), ('A', 'B', 'C'), ('A', 'B', 'C')]</p>
</blockquote>

<hr>

<p>For strings you can use:</p>

<pre><code>strs = ["AAA", "BBB", "CCC"]
print map(''.join, zip(*strs))
# for python 3 use: list(map(''.join, zip(*strs))) # thanks @cesar
</code></pre>

<p>Output is now a list of strings:</p>

<blockquote>
  <p>['ABC', 'ABC', 'ABC']</p>
</blockquote>

<p><code>''.join</code> is used to map tuples to strings.</p>

python