title: Why does this code make the list that I yield a tuple, but not a list?
body: <p>I am programming a game, and in this code:</p>
  <pre><code>from tkinter import Tk, Button, Canvas, messagebox, mainloop
  import tkinter.ttk
  from tkinter.font import *
  from math import *
  tk = Tk()
  c = Canvas(tk,width=1920,height=950,bg=&quot;#000000&quot;)
  c.pack()
  fallspeed = 0
  gravity = 0.2
  class player:
      global playerpos
      def __init__(player,sx1,sy1,sx2,sy2):
          playerpos = list(str(sx1)+str(sy1)+str(sx2)+str(sy2))
          for i in range(4):
              playerpos[i] = int(playerpos[i])
          playerpos
          player.sx1 = sx1
          player.sx2 = sx2
          player.sy1 = sy1
          player.sy2 = sy2
          playerpos = [sx1,sy1,sx2,sy2]
          global rect
          player.rect = c.create_rectangle(sx1,sy1,sx2,sy2,fill=&quot;#14eeee&quot;)
      def moverect(player,x,y):
          c.move(player.rect,x,y)
          playerpos[0],playerpos[2] += x
          playerpos[1],playerpos[3] += y
      def pickup(item):
          pass
  </code></pre>
  <p>it gives an error saying you can't reassign tuples. Why is playerpos a tuple, but not a list?</p>