title: How can i move more than one item from one list to another in Python
body: <p>I would like to move more than one item from one list to another.</p>
  
  <pre><code>list1 = ['2D','  ','  ','  ','  ','  ','  ','  ','  ']
  list2 = ['XX','XX','5D','4S','3D','  ','  ','  ','  ']
  list3 = ['XX','XX','XX','8C','7H','6C','  ','  ','  ']
  </code></pre>
  
  <p>In the code above <code>'  '</code> is a double space</p>
  
  <p>I would like to be able to move <code>'5D','4S','3D'</code> from <code>list2</code> onto <code>'8C','7H','6C'</code> in <code>list3</code>.</p>
  
  <p>I've tried the code below but it doesn't work.</p>
  
  <pre><code>list1 = ['2D','  ','  ','  ','  ','  ','  ','  ','  ']
  list2 = ['XX','XX','5D','4S','3D','  ','  ','  ','  ']
  list3 = ['XX','XX','XX','8C','7H','6C','  ','  ','  ']
  
  
  items_to_be_moved = list2[list2.index('XX')+2 : list2.index('  ')]
  
  list3[list3.index('  ')] = items_to_be_moved
  del list2[list2.index('XX')+2 : list2.index('  ')]
  
  print('list2',list2)
  print('list3',list3)
  </code></pre>
  
  <p>and this returns</p>
  
  <pre><code>list2 ['XX', 'XX', '  ', '  ', '  ', '  ']
  list3 ['XX', 'XX', 'XX', '8C', '7H', '6C', ['5D', '4S', '3D'], '  ', '  ']
  </code></pre>
  
  <p>However, i dont want to use <code>list2.index('XX')+2</code>, i would like to use a code that gives the last index of <code>'XX'</code> just like <code>list2.index('  ')</code> gives the first index of <code>'  '</code>.</p>
  
  <p>Also, i dont want the moved items to be in a separate list of their own within another list. 
  For example: instead of returning</p>
  
  <pre><code>"list3 ['XX', 'XX', 'XX', '8C', '7H', '6C', ['5D', '4S', '3D'], '  ', '  ']"
  </code></pre>
  
  <p>the list</p>
  
  <pre><code>"list3 ['XX', 'XX', 'XX', '8C', '7H', '6C','5D', '4S', '3D', '  ', '  ']"
  </code></pre>
  
  <p>should be returned.</p>