Skip to content
Related Articles
Open in App
Not now

Related Articles

Python-Quizzes | Python String Quiz | Question 5

Improve Article
Save Article
  • Last Updated : 18 Sep, 2020
Improve Article
Save Article

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
Related Articles

Start Your Coding Journey Now!