摘要:
# Python's list slice syntax can be used without indices # for a few fun and useful things: # You can clear all elements from a list: >>> lst = [1, 2, 3, 4, 5] >>> del lst[:] >>> lst [] # You can r... 阅读全文
posted @ 2017-12-07 15:39
Zhentiw
阅读(269)
评论(0)
推荐(0)
摘要:
https://docs.python.org/2/library/collections.html 阅读全文
posted @ 2017-12-07 15:20
Zhentiw
阅读(233)
评论(0)
推荐(0)
摘要:
>>> 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
阅读(228)
评论(0)
推荐(0)

浙公网安备 33010602011771号