Answers for "python eol"

0

python eol

# If you are facing eol while scanning string literal to resolve add the missing quotes and use the format specifier properly.

# Example of EOL Error
def getName():
    print("My name is Chandler Bing)
getName()

# Output
  File "c:\Projects\Tryouts\listindexerror.py", line 2
    return "My name is Chandler Bing
                                    ^
SyntaxError: EOL while scanning string literal

# Solution to EOL Error
def getName():
    print("My name is Chandler Bing")
getName()

# Output
My name is Chandler Bing
Posted by: Guest on September-04-2021
-2

python eol

frferf
Posted by: Guest on November-02-2020

Python Answers by Framework

Browse Popular Code Answers by Language