You should check your logic and variable names. You're checking if lines[5] is not equal to line6, everytime in your loop. Which it is, because it IS that exact line. You want the check the current line:
if t == "dy":
f = open("C:/Users/Sreeraj/Desktop/Thailand_Rectangle2_National Parks.txt","w")
for line in lines:
if line != line6: # <- Check actual line!
f.write(line)
f.close()