Skip to content
Related Articles

Related Articles

Improve Article

Python-Quizzes | Python String Quiz | Question 5

  • Last Updated : 18 Sep, 2020

Question 5: What is the output of the following program?

import string
Line1 = "And Then There Were None"
Line2 = "Famous In Love"
Line3 = "Famous Were The Kol And Klaus"
Line4 = Line1 + Line2 + Line3
print("And" in Line4)

(A) True 2
(B) True
(C) False
(D) False 2

Answer: (B)

Explanation: The “in” operator returns True if the string contains the substring (ie, And), else returns False.

Quiz of this Question
Please comment below if you find anything wrong in the above post

My Personal Notes arrow_drop_up
Recommended Articles
Page :