def my_range(number):
    """range iterator with consistent semantics over Python 2.x and 3.x"""
    current_value = 0
    while current_value < number:
        yield current_value
        current_value += 1
