Answer the question
In order to leave comments, you need to log in
How to check if a string ends with a search word?
There is a line that is the path to the folder where the files are added. I need to collect files that have different names but always the same ending. for example Abracadabra112_kanal.xls here's how to write a regular expression or how to get around the fact that the file names can be completely different, but the ending is always the same.
Answer the question
In order to leave comments, you need to log in
'Абракадабра112_kanal.xls'.endswith('.xls')
https://docs.python.org/3/library/stdtypes.html#st...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question