I am using linux mint, and to run a python file I have to type in the terminal: python [file path], so is there way to make the file executable, and make it run
python [file path]
1.save your file name as hey.py with the below given hello world script
#! /usr/bin/python print('Hello, world!')
2.open the terminal in that directory
$ python hey.py
or if you are using python3 then
$ python3 hey.py