title: How to print the even-indexed and odd-indexed characters of strings?
body: <p>Task at hand:</p>
  
  <blockquote>
    <p>Given a string, S, of length N that is indexed from 0 to N-1, print
    its even-indexed and odd-indexed characters as 2 space-separated
    strings on a single line.</p>
    
    <p>The test cases are written such that The first line contains an
    integer, N (the number of test cases). Each line i of the N subsequent
    lines contain a String.</p>
  </blockquote>
  
  <p>Here is my code:</p>
  
  <pre><code>N = int(raw_input())
  
  for i in range(0,N):
      string = raw_input()
  
  evenlist = []
  oddlist = []
  
  for item, char in enumerate(strg):
      if item % 2 == 0:
          evenlist.append(char)
      else:
          oddlist.append(char)
  
  print ''.join(evenlist), ''.join(oddlist)
  </code></pre>
  
  <p>Sample run:</p>
  
  <pre class="lang-none prettyprint-override"><code>The first input is:
  2
  Hacker
  Rank
  
  Expected output is:
  Hce akr
  Rn ak
  </code></pre>
  
  <p>But I get:</p>
  
  <pre class="lang-none prettyprint-override"><code>HceRn akrak
  </code></pre>
  
  <p>Here is a link to the <a href="https://www.hackerrank.com/challenges/30-review-loop" rel="nofollow noreferrer">assignment</a> that might explain the question better.</p>