daily pastebin goal
48%
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. list是可变列表, 里面可以存不同的数据类型, 支持列表推导式, 但是并不高效.
  2. array.array适合存储大量的数据, 因为在背后存储的并不是float对象, 而是字节表述.
  3. set适合大量contains检测.
  4. deque适合频繁先进先出的场景, 还支持rotate等复杂操作
  5. tuple可以具名.
  6. heapq提供了heappush和heappop方法, 让用户可以把可变序列当做堆队列或者优先队列来使用.
  7. ================
  8.  
  9. 可以对list实行切片操作.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top