title: How to separate Python list of strings using comma and ampersand depending length?
body: <p>I want to separate Python list of strings using comma and  ampersand depending length.</p>
  
  <p>For example</p>
  
  <pre><code>&gt;&gt;&gt; my_list = ['a'] 
  &gt;&gt;&gt; foo(my_list)
  a
  
  
  &gt;&gt;&gt; my_list = ['a', 'b']
  &gt;&gt;&gt; foo(my_list)
  a &amp; b
  
  &gt;&gt;&gt; my_list = ['a', 'b', 'c']
  &gt;&gt;&gt; foo(my_list)
  a, b &amp; c
  </code></pre>