It would be an else statement after the blankline code
if line.startswith('\n'):
blankline = blankline + 1
else:
if len(line.strip()) < shortest:
shortest = len(line.strip())
# or better yet
line = line.strip()
if len(line) == 0:
blankline = blankline + 1
else:
if len(line) < shortest:
shortest = len(line)
# and
if len(line) > largelinelen: ## same indent level
woooee
Posting Maven
2,703 posts since Dec 2006
Reputation Points: 827
Solved Threads: 779
Skill Endorsements: 9
Generally you set it to the length of the first record that is not blank/empty.
woooee
Posting Maven
2,703 posts since Dec 2006
Reputation Points: 827
Solved Threads: 779
Skill Endorsements: 9