Question-163: Which of the following statements are correct?
- Your function can return a list.
- Get all Questions and Answer from here
- You need to have paid subscription to access all questions
- Thanks for considering Python Certification Material
Answer: A,B,C,D
Exp:
Returning list from a function
- Your function can return a list.
- Your function can return list, string, char, int, float, Boolean, None all.
- However, function can return only one this at a time.
- Your function can not return more than one value.
- If you want to return more than one value then pack them in list and then return.
Returning list from a function
def split(string): list=[] for i in string: if i not in list: list.append(i)
You can access to full explanation to question and answer from this page. |