Python Dynamically Add Attribute To Element