Removing /n from text files

Hi there.
I have created a simple text file with notepad with the contents of:

1
2
3

When running

log fileContents

the output is: 1
2
3

I have attempted to use:

 delete every occurrence of "
" in fileContents

However this does not remove the "
" from the content of the fileContents.
How can I remove these characters?
Thanks for your help in advance.

Those
's are newline characters and you can remove them like this:

delete return in filecontents

However, if your intent is to iterate over the file line by line, then you can do something like the following and the newline characters will be ignored as a standard line ending character:

repeat with each line of file "/path/to/myfile"
     // do something with the line of data
end repeat

Original reply corrected.