About 57,400 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 Functions - GeeksforGeeks

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

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

  4. The Python Language Reference — Python 3.15.2 documentation

    1 day ago · This reference manual describes the syntax and core semantics of the language. It is terse, but attempts to be exact and …

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

  6. Python Functions - Python Guides

    Functions are one of the most powerful features in Python, enabling code reuse, abstraction, and modularity. By mastering the …

  7. The Python Tutorial — Python 3.15.2 documentation

    3 days ago · Python’s elegant syntax and dynamic typing, together with its interpreted nature, make it an ideal language for scripting …

  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 …

  9. Python Syntax - GeeksforGeeks

    Sep 22, 2026 · Python syntax is the set of rules used to write and organise Python code. These rules define how statements, …

  10. Python Cheat Sheet

    It covers Python setup, syntax, data types, variables, strings, control flow, functions, classes, errors, I/O, and more! You can also …