def parse_querystring(msg):
    'parse a querystring into keys and values'
    for part in msg.querystring.strip().lstrip('?').split('&'):
        key, value = part.split('=')
        yield key, value
def parse_querystring ( msg ) : for part in msg . querystring . strip ( ) . lstrip ( '?' ) . split ( '&' ) : key , value = part . split ( '=' ) yield key , value
parse a querystring into keys and values