Open In App

Python-Quizzes | Python String Quiz | Question 5

Like Article
Like
Save
Share
Report

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


Last Updated : 18 Sep, 2020
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads