7个小技巧让Python代码更优雅

1 Using enumerate()

2 Using zip()

3 Tuple unpacking

4 Default dict values

5 For … else

6 File reading with ‘with’

7 Exception handling

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.