We assume that you have Python interpreter set in PATH variable and your file present in the same directory where you are currently at. Now, try to run this program as follows –
$ python blog.py
Your program must be present in current directory otherwise you will get this error – “python: can’t open file ‘blog.py’: [Errno 2] No such file or directory”
This script will produce same output,
This is a sample Python Program