Skip to content

Comment on Show HN: Pythonpy – the swiss army knife of the command lineparent

Comments

Yea, IMO the best way to do this with pythonpy is:

  py -l 'len(l)'
That being said, I still use wc -l every time. In fact, I always prefer regular unix commands (e.g. grep, xargs, head) to pythonpy when possible. But there are some things, such as:
  py -l 'l[::2]'
which while possible with tools like sed, are just much better expressed with pythonpy.
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.