How to check the length of 2 contract lists in DAML Triggers?

I have fetched 2 contract lists by T.queryContractKey in DAML Trigger and applied some filters on it. Now I want to compare the size or length of the contract list.

How can I do that?

Is the length function what you’re after? Otherwise, can you please share a little bit more of your code, to make your question a bit clearer?

can you share a sample code for length function to compare 2 lists?

Here is an example:

test = script do
  let xs = [1,2]
  let ys = [1,2,3]

  assert (length xs < length ys)

Thanks @cocreature