python how to draw a square

import turtle

turtle.forward(50)
turtle.left(90)
turtle.forward(50)
turtle.left(90)
turtle.forward(50)
turtle.left(90)
turtle.forward(50)
turtle.left(90)

Here is what the above code is Doing:
1. turtle.forward(50) moves the turtle 50 pixels forward.
2. turtle.left(90) turns the turtle 90 degrees to the left.
3. turtle.forward(50) moves the turtle 50 pixels forward.
4. turtle.left(90) turns the turtle 90 degrees to the left.
5. turtle.forward(50) moves the turtle 50 pixels forward.
6. turtle.left(90) turns the turtle 90 degrees to the left.
7. turtle.forward(50) moves the turtle 50 pixels forward.
8. turtle.left(90) turns the turtle 90 degrees to the left.