Anyone knows how does the split function work in python? I mean, does it read the string char by char and then evaluates the code or it has another way of working? I’ve read the doc but it doesn’t mention.
EDIT
For those who are curious like me, just check here. It should be on the 147th line as Chris stated.
If you check out the python source code (I used 2.7.1, but I doubt the location changed in the 3.x series), the full implementation can be found at
$src_dir/Objects/stringlib/split.h. The function’s name isstringlib_splitand in 2.7.1 can be found on line 147.