python 2.7 - How to skip a function -
i learning python , trying make little game. question can define function skip , use later. ex.
def func() print"1,2,3,4" func() def func2() print "counting" func() func2()
how skip func still able print later?
if you're asking think you're asking, yes. in fact, that's whole point. functions sections of reusable code define first (they don't run when they're defined!) , call function later.
for example, can define function, helloworld
this:
def helloworld(): print "hello, world!" return
at point in program, nothing happens. can call function this:
helloworld()
at point, "hello, world!"
output console, , can call function many times like!
Comments
Post a Comment