title: How to find the odd numbers in a given range in Python?
body: <p>Shown below is the code to print the odd numbers in a given range of integers.</p>
  <p>When I'm using the <code>return</code> keyword, it's checking the <code>3</code> and returning the <code>num</code>, so the output is <code>3</code>, but this is not the required output I'm looking for. The required output is <code>3,5</code>.</p>
  <p>In another case when I'm using the <code>print</code> function instead of <code>return</code>, the program checks 3,4,5 and returns '3 &amp; 5' as the output.</p>
  <p>Could help me to get the right output</p>
  <pre class="lang-py prettyprint-override"><code>def oddNumbers(l, r):
  
      # iterating each number in list
      for num in range(l, r + 1):
  
          # checking condition
          if num % 2 != 0:
  
              return num
  </code></pre>