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
Return multiple values from functions in python
Home
Python
Return multiple values from functions in python
0
votes
asked
May 24, 2020
in
Python
by
SakshiSharma
Return multiple values from functions
#python-return-values
#python-return-multiple-values
Python-questions-answers
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
May 24, 2020
by
Robindeniel
def a():
return 4, 5, 6, 7
p, q, r, s = a()
print(p, q, r, s)
Output:
4, 5, 6, 7
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: How does a function return values?
asked
May 16, 2020
in
Python
by
Robindeniel
#python-return-values
Python-questions-answers
0
votes
Q: How to remove values from a Python array?
asked
May 17, 2020
in
Python
by
SakshiSharma
#python-array
#array-python
Python-questions-answers
0
votes
Q: You are having multiple Memcache servers running Python, in which one of the memcacher server fails, and it has your data, will it ever try to get key data from that one failed server?
asked
Jan 2, 2021
in
Python
by
SakshiSharma
#python-memcache
Python-questions-answers
0
votes
Q: Is it mandatory for a Python Language function to return a value?
asked
Aug 29, 2020
in
Python
by
Robindeniel
#python-return-value-mandatory
#return-value
Python-questions-answers
0
votes
Q: Can you please explain what is the return keyword used for in Python Language?
asked
Aug 29, 2020
in
Python
by
Robindeniel
#return-keyword
#python-return-keyword
Python-questions-answers
0
votes
Q: Is It Mandatory For A Python Function To Return A Value?
asked
Dec 14, 2019
in
Python
by
sharadyadav1986
#python-function
Python-questions-answers
0
votes
Q: What Is The Return Keyword Used For In Python?
asked
Dec 14, 2019
in
Python
by
sharadyadav1986
#python-return-condition
Python-questions-answers
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
+1
vote
Q: In order to store values in terms of key and value we use that core data type in python?
asked
Jan 30, 2022
in
Python
by
sharadyadav1986
python-data-types
Python-questions-answers
0
votes
Q: Write a program in Python for getting indices of N maximum values in a NumPy array.
asked
Oct 12, 2021
in
Python
by
rajeshsharma
n-maximum-value
numpy-array
Python-questions-answers
...