Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Any particular reason you didn't go for the list comprehension?

  def pyChallenge():
    print sum([el for el in range(1001) if not((el%5==0) or el%7==0))])
  # this call is needed to test your function
  pyChallenge()


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: