I have no idea how to proceed with this problem. I have a list containing multiple dictionaries which has some values. I have to sort the based on a value of 'emp_code' in alphanumeric way and emp_code is an alphanumeric value
[{'emp_code':'AB100', 'emp_name':'John'}, {'emp_code':'3', 'emp_name':'Prince'}, {'emp_code':'BA250', 'emp_name':'Jack'},
{'emp_code':'10', 'emp_name':'Jackson'}]
Please help me with this
Expected Output
[{'emp_code':'3', 'emp_name':'Prince'}, {'emp_code':'10', 'emp_name':'Jackson'},
{'emp_code':'AB100', 'emp_name':'John'}, {'emp_code':'BA250', 'emp_name':'Jack'}, ]
I have tried it using sorted function, the sorting of emp_code which is alphanumeric is not working properly. emp_code with 10 is coming before emp_code 3 which is wrong.