Monday 5 March 2012

Python - Pass variables to a function

Functions can also have parameters.

# Comment: The parameters are comma delimited
def helloWorld(Title, Body):
    popup( Body, Title)

# The parameter order is Title, Body
helloWorld("Hello", "World")


The result is the same as in the previous example.



Further Reading:
Python Function Tutorial


03-05-2012
Sikuli X-1.0rc3 (r905)

No comments:

Post a Comment