Maximum sum of non-consecutive elements of an array
The algorithm is conceptually fine: it's simple and it works.

I don't like the use of iter() and next(), though.  When you write for x in amounts, that will already treat amounts as an iterator.  The only benefit you get from an explicit amount = iter(amounts), then, is the ability to write next(amounts, 0).  And the only reason for writing next(amounts, 0) is to handle the special case where the input is an empty list.  You could just as well handle that by pretending that there is always another leading house with 0 money.

def robbery(amounts):
    prev, total = 0, 0
    for amount in amounts:
        prev, total = total, max(total, prev + amount)
    return total


The for loop would be better written with the conventional indentation.