code: def dict_to_qs(dct):
      
      itms = ["%s=%s" % (key, val) for key, val in list(dct.items())
              if val is not None]
      return "&".join(itms)
docs: Takes a dictionary and uses it to create a query string.