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 several jumps use the mod operator **%**

i.e

Jump every 2

```
for i in range(1, 10):
if i%2 == 0:
    print(i)

```

2
4
6
8

jump every 3

```
for i in range(1, 10):
    if i%3 == 0:
        print(i)

```

3
6
9

An so on.
You have to use `continue`

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

```