Python Language Functions: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * Python Language =Overview= <syntaxhighlight lang='py'> def function_name(arguments): <function body> </syntaxhighlight> <syntaxhi...")
 
Line 2: Line 2:
* [[Python Language#Functions|Python Language]]
* [[Python Language#Functions|Python Language]]
=Overview=
=Overview=
Declaration:
<syntaxhighlight lang='py'>
<syntaxhighlight lang='py'>
def function_name(arguments):
def function_name(arguments):
   <function body>
   <function body>
</syntaxhighlight>
Invocation:
<syntaxhighlight lang='py'>
function_name(arguments)
</syntaxhighlight>
</syntaxhighlight>


=Example=
<syntaxhighlight lang='py'>
<syntaxhighlight lang='py'>
def something(a, b):
def something(a, b):

Revision as of 20:09, 22 May 2021

Internal

Overview

Declaration:

def function_name(arguments):
  <function body>

Invocation:

function_name(arguments)

Example

def something(a, b):
  c = a + b
  return c