摘要: >> False >> 'No' >>True >> 'Yes' Solutions: 1 def bool_to_word(boolean): return "Yes" if boolean else "No" 2 def bool_to_word(boolean): return ['No', 阅读全文
posted @ 2022-07-10 14:18 大序列 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 判断 奇数 偶数: Solution: 1 def even_or_odd(number): return 'Even' if number % 2 == 0 else 'Odd' 2 def even_or_odd(number): return ['Even', 'Odd'][number % 阅读全文
posted @ 2022-07-10 10:58 大序列 阅读(13) 评论(0) 推荐(0) 编辑