aboutsummaryrefslogtreecommitdiff
path: root/challenge-250/eric-cheung/python/ch-2.py
blob: 43a7617ff9e6a92113a43545baf868b8b99e5484 (plain)
1
2
3
4
5
6
7
8
9
def GetAlphaNumLen (strInput):
    return int(strInput) if strInput.isnumeric() else len(strInput)

## arrAlphaNumStr = ["perl", "2", "000", "python", "r4ku"]  ## Example 1
arrAlphaNumStr = ["001", "1", "000", "0001"]  ## Example 2

arrOutput = [GetAlphaNumLen(strLoop) for strLoop in arrAlphaNumStr]
print (max(arrOutput))