def func():
    list_of_keys = ['S_Length', 'S_Width', 'P_Length', 'P_Width', 'Predicate']
with open('example.txt') as f:
    spamreader = csv.reader(f, delimiter=',')
return [OrderedDict(zip(list_of_keys, row)) for row in spamreader]
print(func())
[OrderedDict([('S_Length', '2.1'), ('S_Width', '3.5'), ('P_Length', '1.4'),
    ('P_Width', '0.2'), ('Predicate', 'Iris')]), OrderedDict([('S_Length',
    '4.9'), ('S_Width', '3.0'), ('P_Length', '1.4'), ('P_Width', '0.2'), (
    'Predicate', 'Ilia')]), OrderedDict([('S_Length', '3.7'), ('S_Width',
    '3.2'), ('P_Length', '1.3'), ('P_Width', '0.2'), ('Predicate', 'Iridium')])
    ]
Make a list of dynamic dictionary python