Question: I don't understand this simple code:

```
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import time

for val in "cacatcaca":
    try:
        if val == "c":
            print(val)
            time.sleep(0.5)
        if val == "a":
            print(val)
            time.sleep(0.5)
    except val == "t":
        print('We are stock in the letter T')
        time.sleep(0.5)
        continue

```

It gives me as result:

```
c
a
c
a
c
a
c
a

```

while what I want to have is to get stock in the `'t'` until the end of time:

```
c
a
c
a
We are stock in the letter T
We are stock in the letter T
We are stock in the letter T
...
...
...

```

My goal is to reuse the code for Google API when I recieve a `['status'] == 'OVER_QUERY_LIMIT'`. 

I want to keep going and try the `JSON` response until I receive something different.

Answer: 
This code will print "We are stock at the letter t" until the end of time.

```
import time

for val in 'cacatcaca':
    if val == 'c' or val == 'a':
        print(val)
        time.sleep(0.5)
    elif val == 't':
        while val == 't':
            print('We are stock at letter t')

```
For a reusable design, I would prefer using a solution based on such code:

```
def fetch_google_api_until_works(*args, **kwargs):
    ok = False
    while not ok:
        response = legacy_fetch_google_api(*args, **kwargs)
        ok = response.get('status', False) != 'OVER_QUERY_LIMIT'
        if not ok:
            time.sleep(0.5)
    return response

```

Then use `fetch_google_api_until_works` in your app code.