Seven is a hungry number and its favourite food is number 9. Whenever it spots 9
through the hoops of 8, it eats it! Well, not anymore, because you are 
going to help the 9 by locating that particular sequence (7,8,9) in an array of digits
and tell 7 to come after 9 instead. Seven "ate" nine, no more!
(If 9 is not in danger, just return the same array)
def hungry_seven(arr):

    nums = ''.join(str(a) for a in arr)

    while '789' in nums:
        nums = nums.replace('789','897')

    return [int(n) for n in nums]
def hungry_seven(arr):

    nums = ''.join(str(a) for a in arr)

    while '789' in nums:
        nums = nums.replace('789','897')

    return [int(n) for n in nums]