I am learning python and trying to make a little game. So my question is can you define a function but skip it and use it later. EX.
How would I skip func but still be able to print it later?
Best How To :
If I you're asking what I think you're asking, then yes. In fact, that's the whole point. Functions are sections of reusable code that you define first (they don't run when they're defined!) and then you call that function later.
For example, you can define a function,
helloworld like this:
print "Hello, world!"
At this point in the program, nothing happens. You can then call the function like this:
At this point,
"Hello, world!" will output to the console, and you can call the function as many times as you like!