adplus-dvertising
frame-decoration

Question

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)

Posted under Strings in Python Python

Answer: (a).s1.__contains__(s2)

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. To check whether string s1 contains another string s2, use