说我在Python中有这个代码.我是Perl程序员,你可能会说.
# Both list1 and list2 are a list of strings
for x in list1:
for y in list2:
if y in x:
return True
return False
Run Code Online (Sandbox Code Playgroud)
有什么更Pythonic的方法来处理这个问题?我认为列表理解可以做得很好,但我无法理解这个"过程两个单独的列表"的一部分.