Question: I have an interveiw yesterday, when I write python code to achieve some algorithm, I have a question. Some logic can be achieved like this using C:

```
void get_some_num(int a[], int length) {       
   int i;
   for(i = 0; i < length - 1; ++i) {
       if(something) i++; // jump a num in the array
       a[i] = 1;
   }
    return some_num;
 }

```

C language can jump some elements(such as n) when using `i += n` statement in for-loop to iterate an array, but I find it's difficult to achieve by using python's for statement gracefully.

How can I do it?

Answer: 
If you want to do this in a way similar to `C`, then just use a `while` loop (any `for` loop is really just a specialization of a `while` loop after all):

```
i = 0
end = 10

while i < end:
    # NOTE: do something with i here

    if i == 5:
        i += 3
    i += 1

```

Or you can explicitly create and move forward the iterator (which I find a lot less readable):

```
it = iter(range(0, 10))

for i in it:
    if i == 5:
        for j in range(0, 3):
            i = next(it)
    print(i)

```
You have to use `continue`

```
for item in loop:
    if item == 'wrong':
        continue

```