2020-10-19 21:08:55

This commit is contained in:
wizardforcel
2020-10-19 21:08:55 +08:00
parent 7f63048035
commit ab0caba1f0
140 changed files with 3982 additions and 3982 deletions

View File

@@ -14,7 +14,7 @@
安装好 `Python` 之后,在命令行下输入:
```
```py
python
```
@@ -24,12 +24,12 @@ python
In [1]:
```
```py
print "hello world!"
```
```
```py
hello world!
```
@@ -38,7 +38,7 @@ hello world!
可以将这句话的内容保存到一个文本文件中,并使用后缀名 `.py` 结尾,例如 `hello_world.py`,在命令行下运行这个程序:
```
```py
python hello_world.py
```
@@ -54,12 +54,12 @@ python hello_world.py
In [2]:
```
```py
import this
```
```
```py
The Zen of Python, by Tim Peters
Beautiful is better than ugly.
@@ -88,7 +88,7 @@ Namespaces are one honking great idea -- let's do more of those!
In [3]:
```
```py
s = """Gur Mra bs Clguba, ol Gvz Crgref
Ornhgvshy vf orggre guna htyl.
@@ -120,7 +120,7 @@ print "".join([d.get(c, c) for c in s])
```
```
```py
The Zen of Python, by Tim Peters
Beautiful is better than ugly.