wc

return the number of items

Usage

  • <pipelined-iterable> | wc
  • wc(<iterable>)

Examples

>>> from grapevine import *
>>> wc(['foo', 'bar', 'quux'])
3
>>> cat(None for x in xrange(0, 7) for y in xrange(0, x) for z in xrange(y, x)) | wc
56