摘要: 一.用字典映射代替switch case语句 if/else可以代替switch但是非常不合适。 用字典代替switch: day = 5 switcher = { 0:'Sunday', 1:'Monday', 2:'Tuesday' } day_name = switcher.get(day,' 阅读全文
posted @ 2020-02-13 19:31 Sudo高 阅读(277) 评论(0) 推荐(0) 编辑