Created
October 2, 2017 17:17
-
-
Save Aniruddha-Tapas/31cb6316788c1852223dad6cb0602e39 to your computer and use it in GitHub Desktop.
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
# Prints the line number, the line and the characters count | |
# of those lines in the file | |
# which exceed the 80 character limit. | |
import sys | |
#infile = open ("YOUR-FILE-NAME") | |
infile = open ("q1.rkt") | |
# Prints total number of lines in the program | |
#print(sum(1 for line in infile)) | |
for i,line in enumerate(infile): | |
if len(line) >= 81: | |
print (i+1 , line, len(line)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment