+ 1
how to write python in linux terminal?
3 Answers
+ 2
$ sudo apt-get install python3
... (Downloading)
$ python3
python 3.7.1
>>>print("Hello world!")
Hello world!
+ 1
# Install
# Gentoo
$ emerge -av dev-lang/python
# Debian
$ sudo apt install python3
# run python
$ python3
+ 1
If you have python script you can run it like
$r>python3 test.py
where test.py is name of file
also if you have python2.7 scripts you can simply do
$r>python test.py
as python2.7 comes installed default also u can't remove python2.7 your latest python version will run parallel to 2.7