the functions in Python are simple, the basic principles are the same as C or Java, there are some differences in individual details, but usually do not affect the normal use of small white players, such as the C hollow return type Void,python is None , the first declaration of the function after use, etc. in Python is one, do not need to be as strict as the need to declare in C. Python doesn't need that much "extra" work. Some concepts, such as formal parameters and arguments, are similar to those in C and Java.
The use of functions in Python is also simple, using DEF to define functions.
>>> def hello ():
... print ' Hello World '
>>>
>>> res = hello ()
Hello World
the content of the function is relatively few, the content of the textbook gives more, but a lot of content uses not many, the interest oneself research research study, as well as later chapter "module", "module" This part knows how to import the module to be enough,
Import * * * * * and from***import*** Two forms of usage browse it almost.
Python Introductory Tutorial Series: Second, function