yifeitao
2016-07-17
这是一个简单介绍Python的Slide,鼓励团队成员学习Python,用于数据分析等。
>>> 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("Hello,world")raw_input("?")a = b = c = 1
a, b, c = 1, 2, "python"
a, b = b, aif condition_1:
statement_block_1
elif condition_2:
statement_block_2
else:
statement_block_3while <condition>:
<statement_block_1>
else:
<statement_block_2>
for <variable> in <sequence>:
<statements>
else:
<statements># 计算面积函数
def area(width, height):
return width * height…
…
…