decode with an argument string 'ascii', substitute the result for name. take elements of p from index i incremented by 1 to the end, strip the result of the whitespaces, substitute it for value.
value = p [ i + 1 : ] . strip ( )