Python backslash not working when data is pasted into Notepad

Hi all, I am trying to provide conditional spacing between lines if a panel using backslash code for python but when I paste the data into a notepad file then it is now showing any space between the lines.

However, in the panel, it is showing fine. Does anybody know how to solve this issue?
Thank you!

File and both screenshots are attached here!
NotePadError

PythonBackslashError.gh (11.0 KB)

Hello,

This is because windows newlines are not the same as unix newlines. You can use, for instance, s1 ="\r\n" to get this to work in notepad or use Notepad++ with the code unchanged.

Graham

2 Likes

@Dancergraham Thanks a lot it worked :slight_smile: