title: how to check isinstance of iterable in python?
body: <p>consider this example?</p>
  
  <pre><code>p = [1,2,3,4], (1,2,3), set([1,2,3])]
  </code></pre>
  
  <p>instead of checking for each types like</p>
  
  <pre><code>for x in p:
     if isinstance(x, list):
        xxxxx
     elif isinstance(x, tuple):
        xxxxxx
     elif isinstance(x, set):
        xxxxxxx
  </code></pre>
  
  <p>Is there some equivalent for the following:</p>
  
  <pre><code>for element in something:
    if isinstance(x, iterable):
        do something
  </code></pre>