Python-测验| Python字符串测验 |问题 5
问题 5:以下程序的输出是什么?
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)真 2
(B)真
(C)错误
(D)错误 2答案:(乙)
说明:如果字符串包含子字符串(即 And),则“in”运算符返回 True,否则返回 False。
这个问题的测验
如果您发现上面的帖子有任何错误,请在下面评论