title: Is there a way to construct lazy sequences in Python?
body: <p>There is a Django view that loads <code>Member</code> objects from the database with a certain filter.</p>
  
  <p>Now I need to change this logic to <strong>present a specific <code>Member</code> first, and let the rest follow in their natural order</strong>.</p>
  
  <p>The most straightforward way is to execute the query right away, get a list, remove and insert the item at the beginning. However I am most curious <strong>if there is still any way to make use of <code>QuerySet</code>'s lazy nature</strong>.</p>
  
  <p>In C#, I would write:</p>
  
  <pre><code>IEnumerable&lt;Member&gt; members = db.Members; // db.Members is lazy
  members = Enumerable.Union( // construct a lazy sequence that traverses its arguments
      new [] { specificMember },
      members.Where(m =&gt; m != specificMember)
  );
  </code></pre>
  
  <p>As a loop would go through <code>members</code>, it would first get <code>specificMember</code> and then use <strong>whatever lazy loading logic original <code>db.Members</code> used</strong>.</p>
  
  <p>Is there a way to do the same in Django and Python?</p>