title: Print Variable/Dynamic List of String
body: <p>I have a list of string with variable length.  I do know that the minimum length of the list is 4.  How do I print the list in the following format if the list grows to more than 4?</p>
  
  <pre><code>&gt;&gt;&gt; strlist = ['a', 'b', 'c', 'd', 'f', 'g'] # Unknown length
  &gt;&gt;&gt; print ('%s %s %s %s' % (strlist [2], strlist [0], strlist [4], strlist [5]))
  
  c a f g
  </code></pre>
  
  <p>If the list expands to</p>
  
  <pre><code>[..., 'h', 'i', 'j']
  </code></pre>
  
  <p>then I want the output to be</p>
  
  <pre><code>c a f g h i j
  </code></pre>
  
  <p>Obviously, I can't put 500 "%s" in my print function if the list expands so I'm hoping there's a better way.</p>