a = []i = 0 for i in xrange(1, 10000): if i%3==0 or i%5==0: a.append(i) i += 1 print sum(a)
Standard input is empty
23331668
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!