Python Dynamic Add Attribute To Element