Jump to content

Python support Function Declaration ?


Recommended Posts

Sir, can I declare a Function with its return type and parameter's type on Python like C Language?

void main()
  void sum(int,int); /*function declaration*/

void sum(int x,int y)/*function defination*/
  /*function body*/
  int result;
  printf ("The Sum is %d",result);

Can i do this same code on python? Python support Function Declaration? If yes, then how i declare a function on python

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...