t904.py 160 B

1234567891011
  1. import collections
  2. c = collections.Counter("hello world")
  3. print c
  4. c.subtract("hello")
  5. print c
  6. c.subtract()
  7. print c
  8. c.update("hello")
  9. print c
  10. c.update()
  11. print c