I have a list:
lis = {{"a", "b", "X", "0"}, {"a", "f", "z", "1"}, {"g", "a", "z", "1"}, {"a", "b", "x", "0"}};
The last field of each element of lis
is either "0" or "1".
I need to convert the third field in each element to upper case and then determine if there are any two elements in the list which have now become duplicates, delete the duplicate, and then change the last field of the remaining element from the deletion pair from "0" to "1" to get:
res = {{"a", "b", "X", "1"}, {"a", "f", "Z", "1"}, {"g", "a", "Z", "1"}}
Making the third field upper case and deleting duplicates is simple, but I'm not sure how to convert the last field from "0" to "1". Thanks for any suggestions...