[Tutor] creating Turtle() object using 2 different ways

Ian D duxbuz at hotmail.com
Fri Jan 31 11:09:12 CET 2014


Hi
 
Another quickie.
 
I can create turtle objects (if that's the correct terminology) using 2 different ways, both work.
 
t1 = turtle.Turtle()
 or
t2 = turtle
 
But which is the best practice... and why?
 
 
 
 
import turtle
 
t1 = turtle.Turtle()
 
t2 = turtle
 
t1.fd(100)
 
t2.goto(-100,100)
t2.fd(100)
 
 
 
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20140131/3133537e/attachment.html>


More information about the Tutor mailing list