Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm a total newbie at Python, but wouldn't

  ''.join(map(chr, list))
avoid the quadratic time of doing "string += something" (and also be a prettier solution IMO)?

(In Python 2.x doing ''.join(chr(n) for n in list) might be a better solution to avoid the intermediate list created by map)



The article is from 2002, so it's entire line of reasoning is quite outdated.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: