## two command-line arguments # first is a filename # second is a string # tell if the file contains the string. from sys import argv file_name = argv[1] search_string = argv[2] fp = open(file_name, "r") contents = fp.read() fp.close() if search_string in contents: print(f"The string {search_string} is in file {file_name}.") else: print(f"The string {search_string} is not in file {file_name}.")