Home > other >  PYTHON: issues about endswith ()
PYTHON: issues about endswith ()

Time:11-17






Why execute code, in the report is invalid syntax (invalid syntax), the following
The File "string_method03. Py, line 47
If filename. Endswith (' JPG. ') or filename. Endswith (' PNG. ') or filename. Endswith (' BMP.)
^
SyntaxError: invalid syntax



Each a great god, and you will give advice. Thanks

CodePudding user response:

The if... Finally, add a colon

CodePudding user response:

If filename. Endswith (' JPG. ') or filename. Endswith (' PNG. ') or filename. Endswith (' BMP.) grammar errors, put in front of the point,, JPG, PNG, the BPM

CodePudding user response:

If the back of the colon?

CodePudding user response:

reference 1st floor chuifengde response:
the if... Finally, add a colon




Thank you very much, if statement last missed:

thank you

CodePudding user response:

Thank you to learn
  • Related