Search code examples
cursorpymongo

Pymongo : skip line in cursor


How to skip a line in cursor. I used next() but I got an error. Here is my code:

for row in cursor:
           if(...):
             move to next line
           else :
              ...

Thank you


Solution

  • Try something like this:

    for row in cursor:
       if (...):
          continue
    
       standard logic here....