4 ms·
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 Na
by kingkilr 15y 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.