How to run the script: In terminal: $ ./dates_task.py or $ python3 dates_task.py example: $ ./dates_task.py file.txt $ python3 dates_task.py file.txt