title: Concise way to create single member list in Python?
body: <p>Suppose I have some object <code>x</code> that may be a single instance of a data type (say <code>float</code>) or it may be a list of <code>float</code> types.</p>
  
  <p>Is there any what I can ensure that <code>x</code> is wrapped as a list, perhaps being a singleton list if necessary, without checking its type or doing anything like that.</p>
  
  <p>I'd like for something like <code>list(x)</code> to just always work, whether <code>x</code> was a singleton or not, but this doesn't work since a singleton isn't iterable.</p>
  
  <p>Edit: see <a href="https://stackoverflow.com/a/26017248/567620">my answer below</a> for some elaboration.</p>
  
  <p>At the same time, I don't want to define my own function to construct lists from singeltons, and I don't want to do anything inline like this either:</p>
  
  <pre><code>from collections import Iterable
  y = [x] if not isinstance(x, Iterable) else list(x)
  </code></pre>
  
  <p>If nothing more concise than this exists, that's OK. I am looking for some clean way of doing this that's already built into the language. </p>
  
  <p>I'm sure some may think the <code>isinstance</code> approach is clean and good, but I'm specifically looking for something more concise that doesn't require me to write anything new before hand. I just can't find anything when searching doc pages and I'm not sure how to ask this question to a search engine.</p>