MCQ Answer

Which of the following is the correct way to check if a value exists in a list?

Which of the following is the correct way to check if a value exists in a list?

किसी लिस्ट में कोई मान मौजूद है या नहीं इसकी जाँच करने का निम्नलिखित में से कौन सा सही तरीका है?
Topic : Sequence data types in python

A. list.contains(value)

B. list.index(value)

C. list.contains(value)

D. value in list




Correct Answer is :

D. value in list



Explanation

in operator is used to check the exitance of a element in list.

syntax:

element in list_name

CCC Online Test 2021 CCC Practice Test Hindi Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Best Java Training Institute in Prayagraj (Allahabad) Best Python Training Institute in Prayagraj (Allahabad) O Level Online Test in Hindi Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Sarkari Naukari Notification Best Website and Software Company in Allahabad Sarkari Exam Quiz