In [5]:
import os
import glob
In [6]:
os.getcwd()
Out[6]:
In [7]:
path = 'C:\\Users\\Dell\\Downloads'
In [8]:
extension = 'csv'
os.chdir(path)
In [9]:
result = [i for i in glob.glob('*.{}'.format(extension))]
print(result)
In [ ]: