title: Bubblesort visualization in tkinter
body: <p>I can't figure out how can I finish one simple program written in Python. Program basically generates array of ten random numbers and then sorts them using bubblesort algorithm. Whole shorting process should be shown on screen - such as this one</p>
  
  <p><a href="https://i.stack.imgur.com/gQJsN.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gQJsN.gif" alt="enter image description here"></a></p>
  
  <p>My current code is this:</p>
  
  <pre><code>import tkinter
  import random
  canvas = tkinter.Canvas(bg='white',width='800',height='400')
  canvas.pack()
  
  c = []
  for i in range(0,10):
      c=c+[random.randrange(10)]
  print(c)
  print('Zoradenie...', c)
  
  def sort(c):
      x=300
      for i in range(0,10):
          for j in range(0,len(c)-1-1):
              if c[j+1]&lt;c[j]:
                  c[j+1],c[j]=c[j],c[j+1]
                  canvas.create_text(300,80,text=c[j],fill='Red')
              x+=25
              canvas.update()
              canvas.after(1000)
              print(c)              
      return c
  sort(c)
  </code></pre>
  
  <p>But I can't figure out how to show numbers on screen. Any ideas?</p>