-1

I used the following code:

remove_image=[]
for n,i in enumerate(data['class']):
    if i == str("\"):
        print(i,n)
        remove_image.append(n)

I got the following error:

  File "<ipython-input-109-3dce64dd25ea>", line 3
    if i == str("\"):
                     ^
SyntaxError: EOL while scanning string literal

enter image description here

1 Answers1

2

You need to use " \ \ " (Two backslashes). The first one is to escape the character. "\" needs to be escaped in Python.

m1ghtfr3e
  • 77
  • 9