def is_str_in_string(small_string, big_string):
return small_string in big_string
def has_str_in_string(the_list, big_string):
for small_string in the_list:
if small_string in big_string:
return True
return False
A = ["abc", "ggg"]
B = ["kkk", "sss"]
text = input("请输入:")
while True:
if has_str_in_string(A, text) and has_str_in_string(B, text):
print("Game Over!")
break
text = input("请重新输入:")