()
| 16 | |
| 17 | |
| 18 | def main(): |
| 19 | is_exist = True |
| 20 | # Try to open file if exist else raise exception and try again |
| 21 | while is_exist: |
| 22 | try: |
| 23 | inputFile = input("File Name / (0)exit : ").strip() |
| 24 | if inputFile == "0": |
| 25 | break |
| 26 | print(count_chars(inputFile)) |
| 27 | except FileNotFoundError: |
| 28 | print("File not found...Try again!") |
| 29 | |
| 30 | |
| 31 | if __name__ == "__main__": |
no test coverage detected