PG1X WIKI

My Knowledge Base

User Tools

Site Tools


tech:se:python:hello-python:hello-python

This is an old revision of the document!


Hello Python

on Ubuntu 17.10

✘╹◡╹✘  18-03-19 22:46:50 /home/wnoguchi
% python -V
zsh: command not found: python
✘╹◡╹✘  18-03-19 22:46:55 /home/wnoguchi
% python -v
zsh: command not found: python
✘╹◡╹✘  18-03-19 22:47:07 /home/wnoguchi
% which python3
/usr/bin/python3
✘╹◡╹✘  18-03-19 22:47:14 /home/wnoguchi
% python3 -V
Python 3.6.3

Python2.7 not found anymore.

✘╹◡╹✘  18-03-19 22:47:24 /home/wnoguchi
% python3
Python 3.6.3 (default, Oct  3 2017, 21:45:48)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> print('hello world')
hello world

to quit, type Ctrl+D.

>>>  <- Enter Ctrl+D
✘╹◡╹✘  18-03-19 22:48:11 /home/wnoguchi
% python3
Python 3.6.3 (default, Oct  3 2017, 21:45:48)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
tech/se/python/hello-python/hello-python.1521467863.txt.gz · Last modified: 2018/03/19 22:57 by wnoguchi