How to pass in value to a function through parameters

Add parameter to a function

We can pass in values to a function with parameter.

The following code has a function with parameters.


def foo(who):     
  print 'Hello', who

foo('World!')     

The code above generates the following result.





















Home »
  Python »
    Language Basics »




Python Basics
Operator
Statements
Function Definition
Class
Buildin Functions
Buildin Modules