title: Convert an enum to a list in Python
body: <p>I have an enum that I define like this: </p>
  
  <pre><code>def make_enum(**enums):
      return type('Enum', (), enums)
  
  an_enum = make_enum(first=1, second=2)
  </code></pre>
  
  <p>At some later point I would like to check, if a value that I took as a parameter in a funciton is part of <code>an_enum</code>. Usually i would do it like this </p>
  
  <p><code>assert 1 in to_list(an_enum)</code></p>
  
  <p>How can I convert the enum object <code>an_enum</code> to a list? If that is not possible, how can I check if a value "is part of the enum"?</p>