Skip to main content

9 docs tagged with "Functions"

View all tags

5 Types of Python Function Arguments

Learn about the five types of function arguments in Python: positional, keyword, default, arbitrary positional (*args), and arbitrary keyword (**kwargs) arguments with practical examples.

Anonymous Functions (Lambda) in Python

Learn how to use lambda functions in Python for creating small, anonymous functions, including practical examples with map, filter, sorted, and other built-in functions.

Generator Functions in Python

Learn about generator functions in Python using yield, including lazy evaluation, memory efficiency, generator expressions, and practical examples for processing large datasets.

Higher-Order Functions in Python

Learn about higher-order functions in Python that take other functions as arguments or return functions, including decorators, function factories, and practical examples.

Python Built-in Functions

A comprehensive guide to Python's built-in functions, grouped by category with practical examples for type conversion, mathematical operations, sequence operations, and more.

Recursive Functions in Python

Learn how recursive functions work in Python, including base cases, recursive cases, and practical examples for factorial, Fibonacci, and tree traversal.

User-Defined Functions in Python

Learn how to create user-defined functions in Python using the def keyword, including parameters, return values, default arguments, and function annotations.

What are Functions in Python?

Learn what functions are in Python, why they're useful, and how they help organise code into reusable blocks with practical examples.