Skip to content

Instantly share code, notes, and snippets.

@JustinAzoff
Created November 14, 2016 16:10
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 JustinAzoff/63902c8d127693df35f3f683d01948e1 to your computer and use it in GitHub Desktop.
Save JustinAzoff/63902c8d127693df35f3f683d01948e1 to your computer and use it in GitHub Desktop.
output length of longest lines
#!/usr/bin/env python2
import sys
m=2000
for line in sys.stdin:
if len(line) > m:
print len(line)
m = len(line)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment