I have a list with the following strings:
total 71708
-rw-rw-rw- 1 gpatwprd tmwdprd 221 Nov 19 12:36 20181116.Something name.6781773.CSV
-rw-rw-rw- 1 gpatwprd tmwdprd 221 Nov 19 12:36 20171116.Something name.67885.CSV
And I would like to extract:
- Only the filename which starts from 20181116 (or any other data, this is a dynamic number)
- Only filenames with .CSV and .XLSX
Note that the filename can be variable in length.
How can I do this in python 3?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…