Search code examples
pythonstringsyntax-errorstring-literals

Python: SyntaxError: EOL while scanning string literal


I have the above-mentioned error in s1="some very long string............"

Does anyone know what I am doing wrong?


Solution

  • You are not putting a " before the end of the line.

    Use """ if you want to do this:

    """ a very long string ...... 
    ....that can span multiple lines
    """