标签: python
如何在python中搜索JS文件中的字符串(多行)?
with open(file, 'r') as f: for file_contents in f: if ('search_string_1' in file_contents) or ('search_string_2' in file_contents): print('match found!') f.close()