So I have some code where I create a list at the start and then ask a user if he wants to make an object (turtle), in which case it adds that to the list, OR if he wants to move the turtle (X). If the user has not created the object I want it to print 'Need to create object'. But it doesn't seem to be printing. I know the code prints it out on its own so I am wondering why this isn't working within the function. So essentially I just want the code to print "Need to create object' if I have an empty list.
adventurousch = []
def RoamingTurtles():
command = raw_input("---> ")
if command == 'A':
newAdventureTurtle()
RoamingTurtles()
if command == 'X':
if adventurousch == []:
print "Need to create object"
else:
for i in adventurousch:
i.drawSquare()
print "test2