你能帮我解决这个问题吗?
def group_iter (iterator, n=2, strict=False):
accumulator = []
accumulator.append(item)
if len(accumulator) == n:
yield tuple(accumulator)
accumulator = []
if strict and len(accumulator) !=0:
raise ValuseError("Leftover values")
print "This is count %r " % group_iter
当我运行它时,我得到:
accumulator.append (item)
IndentationError: unexpected indent
我怎么解决这个问题?谢谢!