Skip to main content
1 of 2
kompaui
  • 135
  • 2

Check condition on each list and print out what I want

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.

kompaui
  • 135
  • 2