I have a dictionary in a list like:
my_list = [{'Name':'John','Age':'50','Job':'NIL'},{'Name':'Sara','Age':'70','Job':'NIL'}]
I want to change the value of the key Job in the list based on the parameter that whether their age is above or below 60, like if the age is below 60, the job value is changed to 1 and if the age is above 60 the job value is changed to 0. This is what out I am expecting:
my_list = [{'Name':'John','Age':'50','Job':'1'},{'Name':'Sara','Age':'70','Job':'0'}]