Report Bug

QusWhich of the following is the correct way to check if a value exists in a list? Qusकिसी लिस्ट में कोई मान मौजूद है या नहीं इसकी जाँच करने का निम्नलिखित में से कौन सा सही तरीका है?


A. list.contains(value)
B. list.index(value)
C. list.contains(value)
D. value in list


Solution
D. value in list



Explanation

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

syntax:

element in list_name

Latest Current Affairs 2024 Online Exam Quiz for One day Exam Online Typing Test CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online MBA 2 years Online MCA Online BCA Best Website and Software Company in Allahabad