def _popget(d, key, default=None):
 if (key in d):
  return d.pop(key)
 return default

def _popget ( d , key , default = None ) : if ( key in d ) : return d . pop ( key ) return default
pop the key if found .