1.

Given a string example=”hello” what is the output of example.count(‘l’)?(a) 2(b) 1(c) None(d) 0I had been asked this question in semester exam.This interesting question is from Strings in division Strings of Python

Answer» RIGHT answer is (a) 2

Explanation: L occurs twice in HELLO.


Discussion

No Comment Found

Related InterviewSolutions