<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">"""A demonstration of an infinite while loop"""

def delete_infinite(ell, threshold):
    """Same as right_delete() from while_loop_mod_list.py, but with a mistake
    that turns the loop into an infinite loop"""
    i = 0
    iter_count = 0
    while i &lt; len(ell):
        print('this is the {0}th iteration'.format(iter_count))
        if ell[i] &lt; threshold:
            del ell[i]
        iter_count += 1

if __name__ == '__main__':
    ell = [0, 9001, 1337, 100, 3.14]
    threshold = 200
    delete_infinite(ell, threshold)
</pre></body></html>