title: python - Conditional list formatting
body: <p>On Python 3  I am trying to write a function <code>format_list(items)</code> that takes a list <code>items</code> containing 1 or 2 string elements and returns a string containing the elements.
  Assume that the list being passed will always contain one or two elements (ie, it won't be empty and it won't contain more than two elements).</p>
  
  <p>The conditions are:</p>
  
  <ol>
  <li>If the list contains a single element, that element is returned by the function, unchanged.</li>
  <li>If the list contains two elements, they are returned in a single string with the first element left justified in a field of width 10 followed by a vertical bar ('|') followed by the second element right justified in a field of width 10. You may assume the elements are strings with at most 10 characters each.</li>
  </ol>
  
  <p>So <code>print(format_list(['abc']))</code> would produce:</p>
  
  <pre><code>abc
  </code></pre>
  
  <p>And <code>print(format_list(['Dave', '14']))</code> would produce: </p>
  
  <pre><code>Dave   |   14
  </code></pre>
  
  <p><strong>I have no idea where to even start....</strong></p>