1.

Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1.count(5)?(a) 0(b) 4(c) 1(d) 2This question was posed to me during a job interview.The doubt is from Lists in chapter Lists & List Comprehension of Python

Answer»

The CORRECT OPTION is (d) 2

The EXPLANATION is: Execute in the shell to VERIFY.



Discussion

No Comment Found

Related InterviewSolutions