Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

 3 added 238 characters in body edited Jul 8 '16 at 8:56 Teck-freak 13144 bronze badges Python 2.7 - 654B447B (600B without r-compabilityfilesize) pythons self argument in a class can be replaced by anything indentation only has to be a single space the builtin sorted - funktion (I knew I had seen it, but I thought it to be a method in lists) __ radd __ is not needed (I only support adding B-objects(Bag-type) anyways) Python 2.7 - 654B (600B without r-compability) pythons self argument in a class can be replaced by anything indentation only has to be a single space the builtin sorted - funktion (I knew I had seen it, but I thought it to be a method in lists) Python 2.7 - 447B (filesize) pythons self argument in a class can be replaced by anything indentation only has to be a single space the builtin sorted - funktion (I knew I had seen it, but I thought it to be a method in lists) __ radd __ is not needed (I only support adding B-objects(Bag-type) anyways) 2 added 238 characters in body edited Jul 8 '16 at 8:48 Teck-freak 13144 bronze badges Edit: Thanks to "Kevin Lau - not Kenny" for pointing out these: pythons self argument in a class can be replaced by anything indentation only has to be a single space the builtin sorted - funktion (I knew I had seen it, but I thought it to be a method in lists) Edit: Additionally I saved space by replacing functions with lambdas and new lines and indentations with more semicolons. Code:def s(L):L.sort();return L class B: def __init__(selfS,L=[]):selfS.L=sL=sorted(list(L));self.__rmul__,self.__radd__=self.__mul__,self;S.__add__ def p(self)p=lambda:return[[i]*self[[i]*S.L.count(i)for k,i in enumerate(selfS.L)if i!=self=S.L[k-1]] 1]];S.__eq__=lambda defo:S.L==o.L;S.__rmul__=S.__mul__=lambda __add__(self,o):returnB(S.L*o);S.__add__=lambda o:B(selfS.L+o.L) def;S.__sub__=lambda __sub__(self,o):return B([i for k in selfS.p()for i in k[:max(0,selfS.L.count(k[0])-o.L.count(k[0]))]]) def __mul__(self,o):return B(self;S.L*o) def__div__=lambda __div__(self,o):return B([i for k in selfS.p()for i in k[::o][:[-1,None][len(k)%o==0]]]) def;S.c=lambda c(self,o):return min([[self.L.count(i),0][self[S.L.count(i)