[B tree] modified python program