Closed Shi57 closed 6 months ago
Simply run Python3 *.py For version 3 of python
Python *.py For version 2 of python
(Note '*' should be replaced with the name you used to save the python script)
Stale issue message
Make sure your cd(ed) into web-app or whatever its called and do ' sudo python3 run.py ' if your on Kali linux and i think for windows its ' python run.py '
Stale issue message
This is a fundamental question, however a good question for beginners.
To run a Python script you can use
python
command followed by a space and the path to your Python file. That's it!Just open a command line and type in the word python or python3 in case you have both versions installed.
Example:
The following script is the content of the file
hello.py
:Now we assume our terminal is open in the same directory as the hello.py, then type this in the terminal to run
hello.py
:Happy learning!