title: how do I append a list with two variables to another list that already has that list in it but with different values? python
body: <p>I'm doing my programming coursework, and I've come across an issue</p>
  
  <pre><code>gamecentre1 = [winnerscore, winner]
  
  
  organise = []
  
  organise.extend([gamecentre1])
  
  from operator import attrgetter, itemgetter
  
  sorted(organise, key= itemgetter(0))
  
  print(organise)
  
  
  f = open("gameresults.txt","w")
  
  f.write("Here are the winners of the games: \n")
  
  f.write(str(organise))
  
  f.write("\n")
  
  f.close()
  </code></pre>
  
  <p>I'm trying to add two variables to a list, and add that list to another list. Then, I want to organise that larger list based off of the integer variable of the sublist (the integer is the <code>winnerscore</code>). But, the problem is that I haven't been able to organise them properly, and I worry that since I have to append the same list with the same variables to the larger list without overwriting the existing list in it, the larger list will just have the same values over and over again. </p>
  
  <p>This is because I want to store the variables every time the program runs, without getting rid of the values of the variable from the previous game.</p>
  
  <p>How do I do this?</p>