因为Python的类型是动态的,且具有简洁的数据结构语法,比如列表和字典,所以neo发现它通常可以减少代码行。
Since Python is dynamic typed and has concise syntax for data structures such as list and dictionary, Neo found it usually results in fewer lines of code.
回头看看我们最初的需求列表,我们只用了9行代码就完成了步骤1和步骤2。
Looking at our original list of requirements, we've managed to finish steps one and two with nine lines of code.
第一行说明空列表的和是 0。
应用推荐