title: Can't get Secret Santa code to memorize assigned names
body: <p>I am a newbie in Python, I've learned some basic things like data types, cycles and how functions work so far. The thing is I don't know anything about databases...<br />
  I want to write a Secret Santa code to make a bot for me and my friends. The idea is that after you were invited to join the bot, you enter your name and surname and get assigned to a person (I need the surname part 'cos there are some people with the same name). After that the assigned name needs to be deleted from the initial 'targets' list, so it wouldn't be assigned to anyone else.
  I've made the assignment part so far:</p>
  <pre><code>def appointer(name, surname):
  template = &quot;You are {}'s Secret Santa, congrats!&quot;
  targets = ['George Orwell', 'Vladimir Nabokov', 'Vladimir Sorokin']
          if name == 'George' and surname == 'Orwell':
                      targets.remove('George Orwell')
                      print(template.format(random.choice(targets)))
          elif name == 'Vladimir' and surname == 'Nabokov':
                      targets.remove('Vladimir Nabokov')
                      print(template.format(random.choice(targets)))
          elif name == 'Vladimir' and surname == 'Sorokin':
                      targets.remove('Vladimir Sorokin')
                      print(template.format(random.choice(targets)))
                      print(targets)
          else:
                      print('Wrong name, check again!')
  </code></pre>
  <p>(I need separate names and targets lists 'cos in my language names are declined.)<br />
  Yeah, that's how far I've got!<br />
  So the next step is for the bot to remember the assigned name and remove it from the 'targets' list so when the next person uses the bot he or she doesn't get the same name.
  I've tried to make the assigned names get into the separate list and stuff, but it doesn't work due to multiple 'if' cycles.<br />
  So I've been wondering is there any way to get this thing done without resorting to databases?</p>
  <p><strong>Here's an update:</strong></p>
  <p>The plan to remember the assigned people via inbuilt dictionary didn't work and each time I run the code this dict resets to zero.<br />
  Then I've found a very useful <em>shelve module</em>.
  So here's the code I've made with Tom's help:</p>
  <pre><code>import shelve
  
  shelveFile = shelve.open('mydata')
  
  import random
  
  participants = [....]
  template = &quot;You're {}'s Secret Santa, congrats!&quot;
  
  def appointer(name, surname):
      fullname = name + ' ' + surname
      if fullname not in participants:
          print(&quot;Wrong name, check again!)
          return
      if fullname in shelveFile.keys():
          print(&quot;You already have your victim!&quot;)
          return
      options = [i for i in participants if i != fullname and i not in shelveFile.values()]
      selection = random.choice(options)
      shelveFile[fullname] = selection
      print(template.format(selection))
  
  if __name__ == '__main__':
      appointer(name = input('Enter your name: ').lower().title(), surname = (input('Enter your surname:').lower().title()))
  
  shelveFile.close()
  </code></pre>
  <p>Shelve module gives you an inbuilt database, and every time you run the code you still have the all the assigned people memorized.</p>