Python diff21 method