Posts

Showing posts with the label Pythonic

Pythonic If-else 读书笔记

Image
https://mp.weixin.qq.com/s/tT4DYZn2jNfkn3TzqBqhEg   不是最优的方式, 使用if else Pythonic方式  把判断条件作为函数的输入,  使用handers 字典, 然后字典的键,是条件, 值 是具体处理函数