Pass string value into a function : Function Parameters « Function « Python






Pass string value into a function

Pass string value into a function
def welcome(title):
    """Welcome the player and get his/her name."""
    print "\t\tWelcome to Demo 2s!\n"
    print "\t\t", title, "\n"
 

welcome("Joe")
           
       








Related examples in the same category

1.Four different ways to pass parametersFour different ways to pass parameters
2.Passing value or passing addressPassing value or passing address
3.Python functions are 'typeless'Python functions are 'typeless'
4.Pass immutable and mutable value into functionPass immutable and mutable value into function