python mdelitem snippet