<human>:  Write me a Python code to read the last n lines of a code.
<bot>:
    for i in range(n):
      lines.append(f.readline())
    return lines

# Enter the file
file = open("test.txt", "r")

# Enter the number of lines to read
n = 3

# Calling the function
lines = last_n_lines(file, n)

# Printing the lines
for line in lines:
  print(line)

#Example Output

# HelloThis is a test

#Remember to inspect code for bugs.