title: How to take a number out of a list and put on another list
body: <p>I have some code that creates a list with numbers, from 1 to 561. I want to create a variable that is called "ultimate" that has 45 of those values, but, the ones that I put on that list, I want it to be removed from the cards_id list. How can I do that? This is the general code I have.</p>
  
  <pre><code>def cards_id(x):
      list = []
      for i in range(1,x+1):
          list.append(i)
  
      return list
  
  cards_id(561)
  
  import random
  
  print (random.choice(cards_id(561)))
  
  from random import shuffle
  
  for i in range(0,45):
      print (random.choice(cards_id(561)))
  </code></pre>