I am very new to python so I don't know whether what I am trying to do is doable or not.
I would like to know if I can quote a variable within a python program to retrieve an object attribute.
Below the relevant code which is probably better than wording:
for Volume in volumes:
   row.update(Volume.attachments[0])
   for Key in csv_file_fields:   # Key contains names which are attributes
      try:                       # of the Volume object
        row[Key] = Volume.Key    # But here I get the error that Key
                                 # is not a valid attribute
Is there a way in python to achieve the variable substitution I get in bash by doing $(Key)?
 
    