May 2018
Beginner
472 pages
15h 3m
English
This chapter covers
This chapter assumes that you’re familiar with function definitions in at least one other computer language and with the concepts that correspond to function definitions, arguments, parameters, and so forth.
The basic syntax for a Python function definition is
def name(parameter1, parameter2, . . .):
body
As it does with control structures, Python uses indentation to delimit the body of the function definition. The following simple example puts the factorial ...