It seems to me that some obviously wrong codes still get accepted. Could someone check the OJ? Thanks a lot.
class MovingAverage(object): def __init__(self, size): self.size = size self.L =  def next(self, val): if len(self.L) < self.size: self.L.append(val) return float(sum(self.L))/len(self.L) else: self.L = self.L[1:] + [val] return float(sum(self.L))/self.size
@1337c0d3r. Thank you. It looks good now
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.