4,750 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. How to Define a Function in Python (def, Call, Return)

    Oct 20, 2026 · Learn how to define a function in Python with def: parameters, return values, naming rules, docstrings, type hints, and …

  3. Python def Keyword - GeeksforGeeks

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

  4. Python Functions - GeeksforGeeks

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

  5. 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 …

  6. Defining Your Own Python Function

    Oct 24, 2026 · Learn how to define your own Python function, pass data into it, and return results to write clean, reusable code in …

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

    Nov 4, 2026 · How to define and call a Python function with def, pass arguments to parameters, return a result, and why a function …

  8. What does -> mean in Python function definitions?

    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 …

  9. Python Functions - Computer Science

    It is unusual to write a def in the >>> interpreter, but here it's an interactive way to see how variables and parameters work for each …

  10. Python: Functions (article) | Khan Academy

    Let's break down that function definition statement a little. The first line that declares the name and parameters is called the function …