Created
July 8, 2016 21:53
-
-
Save matt2000/11991679f1f0c534c6b6d2b7e7f35934 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
| #!/usr/bin/python3 | |
| """excess.py <character> <count> | |
| Outputs rows in stdIn having more than <count> occurences of <character>. | |
| """ | |
| from sys import argv, stdin | |
| for line in stdin: | |
| if line.count(argv[1]) > int(argv[2]): | |
| print(line) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment