Skip to main content

Python: Types of Function

In Python, there are mainly three types of function:

  • Built-in functions: The built-in functions are those functions that are pre-defined in Python such as help() to ask for help, min() to get the minimum value, print() to print an object to the terminal.
  • User-Defined Functions: The user-defined functions are those define by the user to perform the specific task.
  • Anonymous functions: It is also called as lambda functions because they are not declared with the standard def keyword.

 Python function may define with or without parameters, and a function may or may not return a value. It entirely depends upon the user requirement .As per our requirement, We can define the User defined functions in multiple ways.

  • Python Function with no argument and no Return value.
  • Function with no argument and with a Return value.
  • Python Function with argument and No Return value.
  • Function with argument and Return value.
Tags
Submitted by devanshi.srivastava on June 15, 2021

Devanshi, is working as a Data Scientist with iVagus. She has expertise in Python, NumPy, Pandas and other data science technologies.

About

At ProgramsBuzz, you can learn, share and grow with millions of techie around the world from different domain like Data Science, Software Development, QA and Digital Marketing. You can ask doubt and get the answer for your queries from our experts.