Write Algorithm For Push And Pop In Python