title: program to extract every alternate letters from a string in python?
body: <p>Python programs are often short and concise and what usually requires bunch of lines in other programming languages (that I know of) can be accomplished in a line or two in python.
  One such program I am trying to write was to extract every other letters from a string.
  I have this working code, but wondering if any other concise way is possible?</p>
  
  <pre><code>&gt;&gt;&gt; s
  'abcdefg'
  &gt;&gt;&gt; b = ""
  &gt;&gt;&gt; for i in range(len(s)):
  ...   if (i%2)==0:
  ...      b+=s[i]
  ... 
  &gt;&gt;&gt; b
  'aceg'
  &gt;&gt;&gt; 
  </code></pre>