title: Python Server connect to multiple Clients
body: <p>I have a short server script which sends a byte to a client informing it what game should be put on a screen. It works for one client but I want to send it to more, but can only send it to the client which connected last, and I cannot figure out why? Do I need to use multiple threads? The code I have is:</p>
  
  <pre><code>import socket
  def gameChose():
          if nb=='Game1':
              conn.sendall(b'Game1')
          if nb=='Game2':
              conn.sendall(b'Game2')
          if nb=='Game3':
              conn.sendall(b'Game3')
  HOST = ''                 
  PORT = 50007              
  s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  s.bind((HOST, PORT))
  s.listen(2)
  for x in range (0,2):
          conn, addr = s.accept()
          print ('Connected by', addr)
  while 1:
      nb = input('What kind of game would you like to play?')
      gameChose()
  </code></pre>
  
  <p>I have placed a for loop because I know how many clients are going to connect. Thanks in advance.</p>