摘要:
Exercise: Solution: def descending_order(num): return eval(''.join(sorted(str(num), reverse=True))) def descending_order(num): return int(''.join(sort 阅读全文
摘要:
In this kata you will create a function that takes a list of non-negative integers and strings and returns a new list with the strings filtered out. E 阅读全文
摘要:
Exercise: 故事: Bob 是一名公交车司机。然而,他在城市居民中非常受欢迎。有这么多乘客想上他的巴士,他有时不得不面对巴士上没有足够空间的问题!他希望你编写一个简单的程序,告诉他是否能够容纳所有乘客。 任务概述: 您必须编写一个接受三个参数的函数: cap是巴士可以容纳的人数,不包括司机。 阅读全文