cara menggunakan jumlah dengan rentang python

res = sum(x for x in range(100, 2001) if x % 3 == 0)
Vivacious Vole