fork download
  1. list = [7,4,11,11,14]
  2.  
  3. def nlist2string(nlist):
  4. def convert_to_alpha(s):
  5. if isinstance(s,str):
  6. return s
  7. else:
  8. return str(unichr(s+97))
  9.  
  10. def reduce_func(x,y):
  11. return convert_to_alpha(x) + convert_to_alpha(y)
  12.  
  13. return reduce(reduce_func, nlist)
  14.  
  15. print nlist2string(list)
Success #stdin #stdout 0.08s 8880KB
stdin
Standard input is empty
stdout
hello