title: How do replace a list with another list in python?
body: <p>I am making a hangman game and I want to be able to replace the list of original words with a list of new words typed in by the user. At the minute my code is this:</p>
  
  <pre><code>gamewords[:] = newgamewords[:]
  </code></pre>
  
  <p>But this does not seem to work...</p>
  
  <p>The original list is this:</p>
  
  <pre><code>gamewords= ['blue','violet','red','orange','fuchsia','cyan','magenta','azure','black','turquoise','pink','scarlet']
  </code></pre>
  
  <p>A word is then chosen for the list randomly</p>
  
  <pre><code> word=gamewords[random.randint(0,len(gamewords)-1)]
  </code></pre>
  
  <p>i want to change it so that the word is chosen from the new list, how do i do this?</p>