title: Is it possible to use for loops inside print statement in Python
body: <p>Can I use print elements in a for loop with some conditions ?<br>
  Actually I have this block of code : </p>
  
  <pre><code>sum = 0
  for i in range(1,1000):
      if i%3 == 0 or i%5 == 0 :
          sum+=i
  print(sum)  
  </code></pre>
  
  <p>and I want to convert it in a single line of code.
  Any help would be greatly appreciated.</p>