import thisと打つと、、 The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex is better than complicated. Flat is better than nested. Sparse is better than dense. Readability counts. Special cases aren't special enough to break the rules. Although practicality beats purity. Errors should never pass silently. Unless explicitly silenced. In the face of ambiguity, refuse the temptation to guess. There should be one-- and preferably only one --obvious way to do it. Although that way may not be obvious at first unless you're Dutch. Now is better than never. Although never is often better than *right* now. If the implementation is hard to explain, it's a bad idea. If the implementation is easy to explain, it may be a good idea. Namespaces are one honking great idea -- let's do more of those!
print("")
name = input("お名前は?") print("こんにちは %s" % (name))
~.pyと保存して、 python3 ~.pyと実行する。
def main(): """ Function doc """ for i in range(1, 6): print("%s" % i) if __name__ == "__main__": main()
apt-get install python3-numpy
apt-get install python3-scipy
apt-get install python3-matplotlib
良さげな本。てかあんまり選択しなかった。グラフとか書けるんだあみたいな。 3.x対応らしい。
分厚い本。7章くらいで、やめた。
いろいろ参考になりそうなのが書いてありそう。
おもしろそうな応用例が書かれている。
Ubuntu15.10では、最初から共存した状態だった。pythonと打つと2系が、python3と打つと3系が動作する。 Ubuntu12では、後入れで入れてた。
http://blog.yubais.net/21.html
pipというツールでライブラリ管理を行っている。 easy_install pip pip install numpy pip install scipy pip install matplotlib pip install scikit-learn
import numpy as np import matplotlib.pyplot as plt x= np.arange(-3,3,0.1) y=np.sin(x) plt.plot(x,y) imshow(x,y)