I am working on a project in python, and have encountered an error.
When I try to run this code: eval("print(\"\n\")")
, it doesn't work and gives me an error: 'SyntaxError: EOL while scanning string literal'. But when I replace the '\n' with a 'Hello World', as shown in this code: eval("print(\"Hello World\")")
, it prints the correct output.
Why is this? I would appreciate any thoughts on the issue so that I can continue working on my project. Thanks in advance.