title: How to get random.sample() from deque in Python 3?
body: <p>I have a collections.deque() of tuples from which I want to draw random samples.
  In Python 2.7, I can use <code>batch = random.sample(my_deque, batch_size)</code>.</p>
  
  <p>But in Python 3.4 this raises <code>TypeError: Population must be a sequence or set.  For dicts, use list(d).</code></p>
  
  <p>What's the best workaround, or recommended way to sample efficiently from a deque in Python 3?</p>