Created
April 9, 2020 20:17
-
-
Save estysdesu/aa15f2126b6baa1333853136d7a282a2 to your computer and use it in GitHub Desktop.
[Python: Length in Second Dimension of List] #2d #list
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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