Skip to content

Instantly share code, notes, and snippets.

@estysdesu
Created April 9, 2020 20:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save estysdesu/aa15f2126b6baa1333853136d7a282a2 to your computer and use it in GitHub Desktop.
Save estysdesu/aa15f2126b6baa1333853136d7a282a2 to your computer and use it in GitHub Desktop.
[Python: Length in Second Dimension of List] #2d #list
from typing import List
# max_len determines the maximum length in the second dimension of Python list
def max_len(items: List) -> int:
maxLen = 0
for item in items:
if (itemLen := len(item)) > maxLen:
maxLen = itemLen
return maxLen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment