Human: Write me a Python function to check if a string in a file line is a string. Assistant: 
Here is a Python function to check if a string in a file line is a string

import os

def check_if_string_in_file_line(file_name, string):
    """
    >>> file_name = "test.txt"
    >>> string = "test"
    >>> check_if_string_in_file_line(file_name, string)
    """
    with open(file_name, "r") as f:
        for line in f:
            if string in line:
                return True
    return False

# Enter the file name
file_name = "test.txt"

# Enter the string
string = "test"

# Calling the function
if check_if_string_in_file_line(file_name, string):
    print("String found")
else:
    print("String not found")

#Example Output
# String found

#Remember to inspect code for bugs.