<human>:  Write me a Python function to check if a line in file exists.
<bot>: Here is a Python function to code to check if a line in file exists

import os

def _line_in_file(file_obj, line):
  """
  >>> file_obj = open("file.txt", "r")
  >>> _line_in_file(file_obj, "This is a line")
  True
  >>> _line_in_file(file_obj, "This is not a line")
  False
  """
  return line in file_obj.read()

# Enter the file name
file_name ="yellow submarine"

# Open the file
file_obj = open(file_name, "r")

# Calling the function
line_in_file = _line_in_file(file_obj, "This is a line")

# Print the line in file

#Remember to inspect code for bugs.