code: def convert(data):
      
      try:
          st = basestring
      except NameError:
          st = str
      if isinstance(data, st):
          return str(data)
      elif isinstance(data, Mapping):
          return dict(map(convert, data.iteritems()))
      elif isinstance(data, Iterable):
          return type(data)(map(convert, data))
      else:
          return data
docs: Convert from unicode to native ascii