[Tutor] Converting string or list to sum

Alan Gauld alan.gauld at blueyonder.co.uk
Sat Jan 31 03:51:34 EST 2004

>    >  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))


Builtins are, as the name says built in, you dont 
need to import them! And you don't need to prefix 
with the module name. Why did you think you'd 
need to do that? Do you habitually import __builtins__?
Have you had problems using builtin functions?

Alan G.

More information about the Tutor mailing list