There is one thing that I do not understand…
Imagine you have a text = ‘hello world’ and you want to split it.
In some places I see people that want to split the text doing:
string.split(text)
In other places I see people just doing:
text.split()
What’s the difference? Why you do in one way or in the other way? Can you give me a theory explanation about that?
Interestingly, the docstrings for the two are not completely the same in Python 2.5.1:
Digging deeper, you’ll see that the two forms are completely equivalent, as string.split(s) actually calls s.split() (search for the split-functions).