Skip to main content
2 of 3
added 4 characters in body
Arnoud Buzing
  • 9.8k
  • 2
  • 49
  • 58

Selecting a sublist based on Length

If you have a simple list of lists as follows:

test = {{1, 2}, {4, 5, 6, 7}, {5, 4, 3}}

How do you ask Mathematica to return the sublist of greatest Length?

I've been trying to write a Select command using pure functions without success.

Todd Allen
  • 2.1k
  • 5
  • 29
  • 32