I have a list of tuples, with a Str, float
list =
[('Trading_State_NZ <= 0.00', 0.0234),
('Product_Type_A <= 0.00', 0.045643),
('Permanent_Resident_Y <= 1.00', 0.0214),
('Applicant_Type_B <= 1.00', 0.0236),
('Valuation_Acceptable_Y <= 1.00', 0.0866),
('Product_Type_6 <= 0.00', 0.0172),
('Trading_State_NT <= 0.00', 0.0553),
('Trading_State_TAS <= 0.00', 0.0251),
('Property_Acceptable_Y <= 1.00', 0.01588),
('Applicant_Type1_at1_miss <= 1.00', 0.0158758),
('Product_Type_I <= 0.00', 0.01571),
('Employer_Name <= 1.00', 0.0552),
('Business_Name <= 0.00', 0.02557),
('Product_Type_E <= 0.00', 0.02457),
('Product_Type_CTP <= 0.00', 0.02457),
('Trading_Postcode <= 1.00', 0.024572),
('Trading_State_ts_miss <= 1.00', 0.0785),
('Variation_2014 <= 0.00', 0.0694),
('Product_Type_C <= 0.00', 0.017145),
('Phone_Number <= 0.00', 0.0789678)]
The string part has two sections before and after <= symbol, "Name <= value", I am looking to separate 0.00 and 1.00 values then sort in descending order based on the float value
list.sort()
list.sort() sorting based on string, I need the split the str based on value and sort?