$sudo apt-get install python
$sudo apt-get install python3
查看python版本
$python --version
Python 2.7.6
$python3 --version
Python 3.4.0
print("hello world!");
$python hello.py
运行结果hello world!
Help on built-in function print in module builtins:
print(...) print(value, ..., sep=' ', end='\n', file=sys.stdout, flush=False)
Prints the values to a stream, or to sys.stdout by default.
Optional keyword arguments:
file: a file-like object (stream); defaults to the current sys.stdout.
sep: string inserted between values, default a space.
end: string appended after the last value, default a newline.
flush: whether to forcibly flush the stream.
#在线文档
[python2 tutorial](http://docs.python.org/2.7/tutorial/)
[python3 tutorial](http://docs.python.org/3.4/tutorial/)
[python2 reference](https://docs.python.org/2/reference/index.html)
[python3 reference](https://docs.python.org/3/reference/index.html)
[python2 标准库在线文档](https://docs.python.org/2/library/index.html)
[python3 标准库在线文档](https://docs.python.org/3/library/index.html)
#将本地库hello.py提交至github
第一次提交要使用
$git push origin master
若直接使用
$git push
会出现
No refs in common and none specified; doing nothing. Perhaps you should specify a branch such as 'master'. Everything up-to-date ``` 因为本地不知道往远程哪里提交。