title: Get Python turtle window to display graphics and remain open
body: <p>In this code I can't see why it isn't printing a hexagon 24 times.  I tell it to make a 6 sided shape with 60 degrees between lines ( a hexagon) and tell it do turn 15 degrees each time.  This ends up being a even 24 for the picture I'm trying to draw.</p>
  
  <pre><code>import turtle
  
  Hex_Count = 0
  
  x = turtle.Turtle()
  x.speed(.25)
  def Hexagon():
      for i in range(24):
          for i in range(6):
              x.forward(100)
              x.left(60)
          Hex_Count = Hex_Count + 1
          x.left(15)
          print(Hex_Count)
  Hexagon
  </code></pre>
  
  <p>But, for some reason, when I run this code the turtle screen pops up for about a half second then closes. How do I get it to perform in the way I want it to?</p>