News for hackers. Stuff that matters.
Re:Ask HN: starting a career in software dev in my thirties,... by BrandonM on Thursday October 21, 2010 @02:51PM (#1816921)
I mainly meant "improve" in terms of conciseness and readability. I didn't see any need for optimization because the snippet runs instantly:

  $ time python -c "print sum(x for x in xrange(2, 1000) if sum(int(y) for y in str(x)) == 7)"
  9324
  
  real	0m0.138s
  user	0m0.012s
  sys	0m0.012s

There are no comments on this comment yet.