Harshad or Niven series: Difference between revisions
m
→Python: Functional: Pruned out one import.
m (→Python: Functional: Updated primitives) |
m (→Python: Functional: Pruned out one import.) |
||
Line 3,217:
>>> </lang>
And we
{{Works with|Python|3.7}}
<lang python>'''Harshad or Niven series'''
from itertools import
Line 3,228:
def harshads():
'''Harshad series'''
if 0 == x % digitSum(x)
)
Line 3,333 ⟶ 3,332:
# MAIN ---
if __name__ == '__main__':
main()</lang>
{{Out}}
<pre>Harshad or Niven series:
|