a python function definition begins with ? I’m a python learning student, can anyone explain how python function definition begins with, write a example program that demonstrates, how python function definition begins with.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people's questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
kushwanth
function in Python: a function is a group of related statements that performs a specific task.
Syntax of Function:
def function_name(parameters):
“””docstring””” /optional/
statement(s)
1.def is a keyword that marks the start of the function header.
2.Parameters through which we pass values to a function. They are optional
3.Optional documentation string (docstring) to describe what the function does.