Register Now

Login

Lost Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

To check whether string s1 contains another string s2, use ________

To check whether string s1 contains another string s2, use ________
a) s1.__contains__(s2)
b) s2 in s1
c) s1.contains(s2)
d) si.in(s2)

Answer: a
Explanation: s2 in s1 works in the same way as calling the special function __contains__ .

Join The Discussion