title: Drawing Labels on a Canvas using Tkinter
body: <p>I'm trying to practice making a canvas using Tkinter but I'm having trouble making Labels appear on the canvas using a for loop. say I have a list that looks like this:</p>
  
  <pre><code>cities = ["Boston","New York","Chicago","Munich","Berlin","Monterrey"]
  </code></pre>
  
  <p>I want a for-loop that will go through each city and then place a label with the name of each city somewhere on the canvas. So far I have this code (only shows a canvas, can't get it to show me the labels):</p>
  
  <pre><code>class Map_Window(Frame):
      def __init__(self,title,left,top,width,height,master):
          Frame.__init__(self,master)
          self.master.title(title)
          self.master.geometry("%dx%d+%d+%d" % (width,height,left,top))
          self.create_gui()
          self.pack()
      def create_gui(self):
          self.frm1 = Frame(self)
          self.canvas = Canvas(self.frm1)
          self.canvas.pack()
          self.frm1.pack()
  </code></pre>
  
  <p>That code will set up the canvas. Now I'm trying to make the class that will place what's on the list inside the canvas. I have this so far:</p>
  
  <pre><code>class Controller:
      def __init__(self, canvas):
          self.canvas = canvas
      def draw_map(self,city_list):
          for l in city_list:
              lbl = Label(self.canvas,text = l).place(x = 1,y = 1)
              lbl.pack()
  </code></pre>
  
  <p>Main part of the code:</p>
  
  <pre><code>top_level = Tk()
  win = Map_Window("Locations",150,150,300,400,top_level)
  drawer = Controller(win.canvas)
  drawer.draw_map(cities)
  top_level.mainloop()
  </code></pre>
  
  <p>As I mentioned above, I can get the canvas to show up correctly but without the labels.</p>