os.listdir() This is the content of the list using
Quarterly report (2017.09) Samsung Electronics' consolidated cash flow statement.csv',
Quarterly Report (2018.03) Samsung Electronics' consolidated financial position statement.csv',
Quarterly report (2018.03) Samsung Electronics' consolidated cash flow statement.csv',
Quarterly report (2018.09) Samsung Electronics' consolidated financial position statement.csv',
Quarterly report (2018.09) Samsung Electronics' consolidated cash flow statement.csv',
Quarterly Report (2019.03) Samsung Electronics' consolidated financial position statement.csv',
Quarterly report (2019.03) Samsung Electronics' consolidated cash flow statement.csv',
Quarterly report (2019.09) Samsung Electronics' consolidated financial position statement.csv',
If there is a list like this, what should I do if I want to list only the statement of financial position on the list?
python
import os
for i in os.listdir():
if 'something' in i:
print(i)
l = [x for x in os.listdir() if 'financial position' in x]
© 2024 OneMinuteCode. All rights reserved.