os.chdir('/mypath')
for file in glob.glob('*.csv'):
    data = open(file).readlines()
data = [i.strip().split(';') for i in data if i[:3] in ['637', '638', '639']]
sortedlist = sorted(data, key=operator.itemgetter(1), reverse=True)
print('Highest for file %s: %s' % (file, sortedlist[0]))
Sorting csv columns in bash, reading bash output into python variables