Inserting text inside a circle in Python
<p>I am trying to write Python code for drawing a DFA. I am planning to use the turtle library. Are there any alternates? I can draw the nodes but am unsure about how to insert the state names inside the circles.
Can anyone please guide me? Below is my code so far.
Thanks!</p>

<pre><code>import turtle

def draw_node(some_turtle):
    myTurtle.circle(50)
    turtle.getscreen().__root.mainloop()


def draw_design():

    window = turtle.Screen()
    window.bgcolor("teal")

    myTurtle = turtle.Turtle()
    myTurtle.color("white")
    myTurtle.shape("turtle")
    myTurtle.speed(5)
    myTurtle.pensize(4)

    draw_node(myTurtle)

    window.exitonclick()

draw_design()
</code></pre>