[Courses] [python] Lesson 4: Modules and command-line arguments

Leslie leslie.brothers at verizon.net
Mon Jul 11 15:49:51 UTC 2011


For anyone interested, here is the official documentation on str.split,
which explains how it works when the separator is not specified or is
None:
http://docs.python.org/library/stdtypes.html?highlight=split#str.split

-Leslie

On Mon, 2011-07-11 at 08:22 -0700, Leslie wrote:
> Correction: When I typed the below, regarding exercise 4,
> > 
> > "Thus I got extra word counts in the case of files containing empty
> > lines, compared with wc -c, when using line.split(' ').",
> 
>       I should have typed "compared with wc -w".
> 
> It is getting interesting. Lenore's results show that line.split(None)
> does the same as line.split(), so that is another clue about the
> difference between those, and line.split(' ').
> > 
> -Leslie
> 
> 
> _______________________________________________
> Courses mailing list
> Courses at linuxchix.org
> http://mailman.linuxchix.org/mailman/listinfo/courses




More information about the Courses mailing list