Hacker News new | ask | show | jobs
by kingkilr 5235 days ago

    def pyChallenge():
      print sum(s for s in range(1000) if s % 7 != 0 and s % 5 != 0)

    pyChallenge()
Produces a TypeError, and using xrange produces a NameError (Python 3?). I have no idea what they're trying, but it doesn't work.
1 comments

I assume it's Python 2 (print is a keyword, not a function).
Ah of course, a SyntaxError would take precedence over their broken builtins.