title: How to create a list of 5 next numbers that are not divided by 3
body: <p>dear community, I started learning Python and want to create a list of 5 next (after the given number) numbers that are not divided by 3 (modulo).
  Here is my code:</p>
  <pre><code>def main(N):
      
  #print a list of 5 next numbers that are not divided by 3
      l = list()
      for i in range(int(N), 150):
          if len(l) &lt; 5:
              if i%3==0:
                  l.append(i+1)
      return [l]
  </code></pre>
  <p>at the end I get f.e. for the <code>print(main(99))</code>:</p>
  <p><code>&gt;&gt;&gt; [100, 103, 106, 109, 112]</code></p>
  <p>I also tried to put i+=1 after if statement but in the end I got even weirder result:</p>
  <p><code>[101, 101, 102, 104, 104]</code></p>
  <p>What do I do wrong and how can I fix it?
  Thanks!</p>