string question. difference between string.split(str, ":") and str.split(":")

Markus Jais mjais at web.de
Thu Oct 25 09:58:26 CEST 2001


hello

what is the difference between

import string
str = "one:two:three"
a, b, c = string.split(str, ":")

and

str = "one:two:three"
a, b, c = str.split(":")


except for the import statement in the first example.

I prefer the 2nd version because it looks more oop
(like Ruby) and less like Perl or C.

but is there any difference,  for example in performance???

any hints are welcome

regards
markus



More information about the Python-list mailing list