add realization by python and quick-selection algorithm