17,100 results
Open links in new tab
  1. Python Functions - W3Schools

    Creating a Function In Python, a function is defined using the def keyword, followed by a function name and parentheses:

  2. Python def Keyword - GeeksforGeeks

    Jul 16, 2026 · def keyword is used to define user-defined functions. Functions help organize code into reusable blocks, making …Read more

  3. How to Define a Function in Python (def, Call, Return)

    Nov 27, 2026 · You define a function in Python with the def keyword: write def, the function name, parentheses with any parameters, …Read more

  4. What does -> mean in Python function definitions? - Stack Overflow

    Jan 17, 2013 · It's a function annotation. In more detail, Python 2.x has docstrings, which allow you to attach a metadata string to …Read more

  5. Python Functions - GeeksforGeeks

    Sep 19, 2026 · Python functions are reusable blocks of code used to perform a specific task. They help organize programs into …Read more

  6. Python Functions – How to Define and Call a Function

    Mar 16, 2022 · In Python, you define a function with the def keyword, then write the function identifier (name) followed by …Read more

  7. Python 3.15.2 documentation

    2 days ago · Created using Sphinx 9.1.1. The official Python documentation.

    Missing:
    • def
    Must include:
  8. Python Functions (With Examples) - Programiz

    A function is a block of code that performs a specific task. In this tutorial, we will learn about the Python function and function …Read more

  9. def | Python Keywords – Real Python

    In Python, the def keyword defines a function, which is a reusable block of code that can accept data input, perform a specific …Read more

  10. Python Functions: def, Parameters and return - codeshack.io

    Nov 4, 2026 · Start with def, then the function's name, a pair of parentheses and a colon, as in def show_line ():. Function names …Read more