Skip to content

Commit dca7613

Browse files
author
guozhen3
committed
index
1 parent 52186a2 commit dca7613

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,35 +15,35 @@
1515

1616
### 感受Python之美
1717

18-
#### 1 仅一行代码
18+
#### 1 简洁之美
1919

2020
通过一行代码,体会Python语言简洁之美
2121

22-
1) 交换`a`,`b`
22+
1) 一行代码交换`a`,`b`
2323

2424
```python
2525
a, b = b, a
2626
```
2727

28-
2) 反转列表
28+
2) 一行代码反转列表
2929

3030
```python
3131
[1,2,3][::-1] # [3,2,1]
3232
```
3333

34-
3) 合并两个字典
34+
3) 一行代码合并两个字典
3535

3636
```python
3737
{**{'a':1,'b':2}, **{'c':3}} # {'a': 1, 'b': 2, 'c': 3}
3838

3939
```
40-
4) 列表去重
40+
4) 一行代码列表去重
4141

4242
```python
4343
set([1,2,2,3,3,3]) # {1, 2, 3}
4444
```
4545

46-
5) 多个列表中的最大值
46+
5) 一行代码多个列表中的最大值
4747

4848
```python
4949
max(max([ [1,2,3], [5,1], [4] ], key=lambda v: max(v))) # 5

0 commit comments

Comments
 (0)