Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
How does a function return values?
Home
Python Flask
How does a function return values?
0
votes
asked
May 11, 2023
in
Python Flask
by
sharadyadav1986
How does a function return values?
function-python
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
May 11, 2023
by
sharadyadav1986
A function uses the ‘return’ keyword to return a value. Take a look:
>>> def add(a,b):
return a+b
Your comment on this answer:
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Related questions
0
votes
Q: Write a function to return a new list where all None values are replaced with the most recent non-None value in the list.
asked
May 9, 2023
in
Python Flask
by
Robin
python
0
votes
Q: How does a function return values?
asked
May 16, 2020
in
Python
by
Robindeniel
#python-return-values
Python-questions-answers
0
votes
Q: How would you handle a situation where you need a function to return multiple values?
asked
Dec 21, 2023
in
C Plus Plus
by
GeorgeBell
c-plus-plus-interview-questions-answers
0
votes
Q: Write a function to impute the median price of the selected California cheeses in place of the missing values.
asked
May 9, 2023
in
Python Flask
by
Robin
medianpricepython
0
votes
Q: Can you return multiple values from a function in C-Sharp?
asked
Feb 16, 2020
in
C Sharp
by
rahuljain1
#c-sharp-functions
0
votes
Q: How does the use of return statements affect exception handling in a function?
asked
Dec 21, 2023
in
Angular
by
GeorgeBell
angularjs-interview-questions-answers
0
votes
Q: How does Python handle a function without a return statement?
asked
Dec 20, 2023
in
C Plus Plus
by
GeorgeBell
cplus-plus-interview-questions-answers
0
votes
Q: How does a return statement interact with recursion in a function?
asked
Dec 20, 2023
in
C Plus Plus
by
GeorgeBell
cplus-plus-interview-questions-answers
0
votes
Q: How does the use of a return statement differ in a void function compared to a non-void function?
asked
Dec 20, 2023
in
C Plus Plus
by
GeorgeBell
return-statement-interview-questions
0
votes
Q: How to add values to a python array?
asked
May 12, 2023
in
Python Flask
by
SakshiSharma
add-value-python
...