I'm wondering if I can call a function in python above its actual definition. I want to put all of my functions at the end of the source code, but I am not sure if this will work. Thanks!
Asked
Active
Viewed 121 times
2 Answers
0
The convention when using python is to call the main function at the end this will resolve any issue you might have with function calls, as the comments suggest, try it out! if that doesn't work, look it up :)
The link @Andy posted does answer your questions (link for reference)
Just make sure to add this:
if __name__ == '__main__':
main()
at the end of your code.