from sys import argv ## usual boilerplate to discipline naughty users. file_name = argv[1] search_string = argv[2] fp = open(file_name, "r") blob = fp.read() if search_string in blob: print(f"The file {file_name} contains the string {search_string}.") else: print(f"The file {file_name} does not contain the string {search_string}.")