Question-163: Which of the following statements are correct?

  1. Your function can return a list.
  2. Get all Questions and Answer from here
  3. You need to have paid subscription to access all questions
  4. 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.

Why Dont you prepare for Python Certifications and Interview Questions with 250+ Questions and Answer : Check Here

Real Exam Number of Questions: 70 Questions
Real Exam Pass Score: 70%
Time Allotted: 90 minutes to complete exam