title: randomly replace item in list
body: <p>I have two lists <code>A =[2,3,4,5,33,42,21]</code> and <code>B = [1,11,35,48,19]</code> I want to randomly delete two items of list <code>B</code> and replace with two random items from list <code>A</code> for 200 iteration. I used this code but only one item of <code>B</code> replace with <code>A</code>. how can I do that?</p>
  <pre><code>import random
  
  A = [2,3,4,5,33,42,21]
  B = [1,11,35,48,19]
  
  x = random.randrange(0,5)
  i = A[x]
  A[x] = B[x]
  B[x] = i
  print(A)
  print(B)
  </code></pre>