re: Project Euler #1 - Multiples of 3 and 5 VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Python print(sum(i for i in range(1001) if i % 3 == 0 or i % 5 == 0))
 

For fun: A shorter solution.

sum({*range(3, 1000, 3)} | {*range(5, 1000, 5)})
 

Great solution. Since I lost touch of python it was a little difficult. Now I understand.

code of conduct - report abuse