Sometimes it is interesting (and useful) to count the various types of lines in a Python file.
Write a interactive program to count the line in a Python file.
Program structure...
Also display the percentage of the total for each type of line. (Don't go crazy, round to the percent.)
Use regular expressions?
Expand Project #1. Find all of the '.py' files in a folder. Collect and display the total counts and percentages for all '.py' files.
If you are working on a project that uses several programming languages, create a code counting program that distinguishes between file types. Remember a comment in one language may not be a comment in another. (Change the counting rules for each language.)
Note: Different file types have have different extensions (suffixes)
Does your operating system distinguish between '.py' and '.PY' files?
Does your Python interpreter distinguish between '.py' and '.PY' files?