Suppose I have a list as follows
{{1, 1, 1, 1, 1, 3}, {1, 1, 3, 4, 1, 1}}
and I want to check the last two coordinates are equal or not. If that is the case then I want it to print out T after that list. So the result should be
{{1, 1, 1, 1, 1, 3}, {1, 1, 3, 4, 1, 1,T}}
I am thinking about using "if" but I have no idea how to do it.
(Append[#, If[#[[-1]] == #[[2]], "T", Nothing]]) & /@ {{1, 1, 1, 1, 1, 3}, {1, 1, 3, 4, 1, 1}}
$\endgroup$