python remove last part of url