Swift replacement for C's for-loop
Python also has no C-style for-loop.  A lot of Python novices write clumsy while-loops as a result.  However, once you learn the Pythonic idioms for looping, you'll wonder why other languages aren't more like Python.

The trick is to get to know…


the range() built-in function, which looks a lot like the stride(through: by:) that you suggested
the enumerate() built-in function, for when you need to iterate over a list and also increment a counter at the same time
the itertools library for more complex situations


If I had to translate your Swift code to Python, I would do it using itertools.count() to generate the infinite sequence [7, 37, 67, 97, …], and itertools.takewhile() to terminate it.

from itertools import count, takewhile

def is_prime(value):
    if value &lt; 2: return False
    if value % 2 == 0: return value == 2
    if value % 3 == 0: return value == 3
    if value % 5 == 0: return value == 5
    if value == 7: return True

    for divisor in takewhile(lambda d: d * d &lt;= value, count(7, 30)):
        if value % divisor == 0: return False
        for offset in [4, 6, 10, 12, 16, 22, 24]:
            if value % (divisor + offset) == 0: return False
    return True


Kevin Ballard has posted a proposal on the swift-evolution mailing list to introduce a takeWhile() to the standard library.  I think that a rich library for manipulating sequence types would make a good replacement for C-style for-loops.