Http Urlencode String Python Functions Within Functions