Define simple function in Python : Function Define « Function « Python






Define simple function in Python

Define simple function in Python
 

def hello():
    print "Hello, world!"

def test():
    hello()

if __name__ == '__main__': test()

           
         
  








Related examples in the same category

1.A function definitionA function definition
2.Power functionPower function
3.A function that writes the Fibonacci series to an arbitrary boundaryA function that writes the Fibonacci series to an arbitrary boundary
4.Define a function in PythonDefine a function in Python
5.Function call
6.Factorial functionFactorial function