1 Feb 2004 03:14
Re: [Tutor] Converting string or list to sum
Isr Gish <isrgish <at> fusemail.com>
2004-02-01 02:14:22 GMT
2004-02-01 02:14:22 GMT
Kalle Svensson" wrote: >> >I'd write >> > >> > d = ''.join(map(str, a)) >> > >> >since that's probably much faster for large lists. >> >> I think that should be: >> import __builtin__ >> d = ''.join(map(__builtin__.str, a)) > >Why? > When I try doing. map(str, a) I got a traceback TypeError: 'str' object is not callable But when I do, map(__builtin__.str, a) It works fine. I'm using ver. 2.3.2 on a Pocket PC. Isr _______________________________________________ Tutor maillist - Tutor <at> python.org http://mail.python.org/mailman/listinfo/tutor(Continue reading)
RSS Feed