Guest User

Untitled

a guest
Jun 13th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. list是可变列表, 里面可以存不同的数据类型, 支持列表推导式, 但是并不高效.
  2. array.array适合存储大量的数据, 因为在背后存储的并不是float对象, 而是字节表述.
  3. set适合大量contains检测.
  4. deque适合频繁先进先出的场景, 还支持rotate等复杂操作
  5. tuple可以具名.
  6. heapq提供了heappush和heappop方法, 让用户可以把可变序列当做堆队列或者优先队列来使用.
  7. ================
  8.  
  9. 可以对list实行切片操作.
Add Comment
Please, Sign In to add comment