上一页 1 ··· 320 321 322 323 324 325 326 327 328 ··· 492 下一页
摘要: >>> import itertools >>> for p in itertools.permutations('ABCD'): ... print(p) ('A', 'B', 'C', 'D') ('A', 'B', 'D', 'C') ('A', 'C', 'B', 'D') ('A', 'C', 'D 阅读全文
posted @ 2017-12-07 15:10 Zhentiw 阅读(207) 评论(0) 推荐(0)
摘要: In this lesson you will create a utility function that allows you to quickly compose behavior of multiple functions to create new behavior. By the end 阅读全文
posted @ 2017-11-30 17:50 Zhentiw 阅读(283) 评论(0) 推荐(0)
摘要: The Object.entries() function is an addition to the ECMAscript scpec in Es2017. This allows us to iterate through the properties of an object and read 阅读全文
posted @ 2017-11-29 22:12 Zhentiw 阅读(173) 评论(0) 推荐(0)
摘要: The Python Standard Library has a lot of modules! To help you get familiar with what's available, here are a selection of our favourite Python Standar 阅读全文
posted @ 2017-11-28 15:50 Zhentiw 阅读(806) 评论(0) 推荐(0)
摘要: Python allows you to open a file, do operations on it, and automatically close it afterwards using with. In the example above we open a file, perform 阅读全文
posted @ 2017-11-28 15:35 Zhentiw 阅读(237) 评论(0) 推荐(0)
摘要: Default arguments are a helpful feature, but there is one situation where they can be surprisingly unhelpful. Using a mutable type (like a list or dic 阅读全文
posted @ 2017-11-27 21:53 Zhentiw 阅读(191) 评论(0) 推荐(0)
摘要: Python provides another useful built-in type: tuples. Tuples are used to store related pieces of information. Consider this example involving latitude 阅读全文
posted @ 2017-11-27 21:48 Zhentiw 阅读(472) 评论(0) 推荐(0)
摘要: What a Proxy does is handle communication for an Object. To create a proxy object, we use the Proxy constructor - new Proxy();. The proxy constructor 阅读全文
posted @ 2017-11-26 16:08 Zhentiw 阅读(241) 评论(0) 推荐(0)
摘要: The iterator protocol is used to define a standard way that an object produces a sequence of values. What that really means is you now have a process 阅读全文
posted @ 2017-11-21 15:20 Zhentiw 阅读(210) 评论(0) 推荐(0)
摘要: Write a function, remove_duplicates that takes a list as its argument and returns a new list containing the unique elements of the original list. The 阅读全文
posted @ 2017-11-21 14:52 Zhentiw 阅读(352) 评论(0) 推荐(0)
上一页 1 ··· 320 321 322 323 324 325 326 327 328 ··· 492 下一页