描述
输入两行字符串,要求判断第一行 字符串是不是第二行的子串
输入
两行字符串。字符串长度不超过100。
输出
如果第一行是第二行的子串,就输出 “YES”,否则输出”NO”
样例输入
hello world this is hello world, it is ok.
样例输出
YES
以下是代码:
- x = input()
- y = input()
- if x in y:
- print('yes')
- else:
- print('no')
描述
输入两行字符串,要求判断第一行 字符串是不是第二行的子串
输入
两行字符串。字符串长度不超过100。
输出
如果第一行是第二行的子串,就输出 “YES”,否则输出”NO”
样例输入
hello world this is hello world, it is ok.
样例输出
YES
以下是代码:
- x = input()
- y = input()
- if x in y:
- print('yes')
- else:
- print('no')