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

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


what is the difference between

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


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


More information about the Python-list mailing list