Skip to main content
added 2 characters in body
Source Link
kglr
  • 400.5k
  • 18
  • 488
  • 929
rownum = LengthWhile[m, Length@# == 2 &]
2
m[[rownum, 2]]
6

If you need the last element in the second column you can also use:

TakeWhile[m, Length@# == 2 &][[-1, 2]]
6
6
rownum = LengthWhile[m, Length@# == 2 &]
2
m[[rownum, 2]]
6

If you need the last element in the second column you can also use:

TakeWhile[m, Length@# == 2 &][[-1, 2]]
6
rownum = LengthWhile[m, Length@# == 2 &]
2
m[[rownum, 2]]
6

If you need the last element in the second column you can also use:

TakeWhile[m, Length@# == 2 &][[-1, 2]]
6
added 124 characters in body
Source Link
kglr
  • 400.5k
  • 18
  • 488
  • 929
rownum = LengthWhile[m, Length@# == 2 &]
2
m[[rownum, 2]]
6

If you need the last element in the second column you can also use:

TakeWhile[m, Length@# == 2 &][[-1, 2]]
6
rownum = LengthWhile[m, Length@# == 2 &]
2
m[[rownum, 2]]
6
rownum = LengthWhile[m, Length@# == 2 &]
2
m[[rownum, 2]]
6

If you need the last element in the second column you can also use:

TakeWhile[m, Length@# == 2 &][[-1, 2]]
6
Source Link
kglr
  • 400.5k
  • 18
  • 488
  • 929

rownum = LengthWhile[m, Length@# == 2 &]
2
m[[rownum, 2]]
6