Skip to content
Advertisement

In python, how can I check if a filename ends in ‘.html’ or ‘_files’?

In python, how can I check if a filename ends in ‘.html’ or ‘_files’?

Advertisement

Answer

You probably want to know if a file name ends in these strings, not the file istelf:

JavaScript

To test whether a file ends in one of these strings, you can do this:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement