Skip to content

Latest commit

 

History

History
32 lines (22 loc) · 671 Bytes

File metadata and controls

32 lines (22 loc) · 671 Bytes

Python Functions

 

Python Functions

 

  • A self-contained block of code that encapsulates a specific task or related group of tasks
  • Code re-usage

 

def function_name(arguments):
    """ doc-string - a short description about the function """
    # Code block
    <statement>
    print(output1)
    print(output2)


def function_name(arguments):
    """ doc-string - a short description about the function """
    # Code block
    <statement>
    return output1, output2

 

Back to Main Menu