title: How to shuffle a copied list without shuffling the original list?
body: <p>I'm using python and want to shuffle a copied list that I write after that into a txt file (see my code below).</p>
  
  <p>Why does the shuffle function randomize the original list, too? I only use the copy for the function call.</p>
  
  <p>Any ideas? Thank you !</p>
  
  <pre><code>from random import shuffle
  
  def shuffleList2txt(myList):
      shuffle(myList)
  
      f = open('randList.txt','w')
      f.write(str(liste))
      f.close()
  
      return(myList)
  
  
  liste = [1,2,3,4,5,6,7,8,9,10]
  copy = liste
  shuffledList = shuffleList2txt(copy)
  </code></pre>
  
  <p>liste and shuffledList are the same ! Why? liste should be the original one and shuffledList should be the shuffled list.... :)</p>