mail.python.org
[BangPypers] python split
[BangPypers] python split. Sibtey Mehdi sibteym at infotechsw.com Tue Oct 21 12:49:18 CEST 2008.Is there a way to split text like below example.
[BangPypers] python split. Sibtey Mehdi sibteym at infotechsw.com Tue Oct 21 12:49:18 CEST 2008.Is there a way to split text like below example.
(cmd, req1, req2, req3, *opts) = input.split() execute_cmd(cmd, req1, req2, req3, opts). A really interesting possibility is: (first, *middle, last) = input.split(). This breaks the parallel to parameter passing, but would be very handy. Are we getting too perlish?
I found the following code in the book (Python 3 Object Oriented > Programming by Dusty Phillips). That's a rather complex example to be teaching the basics. Here's a simple toy class
Code example. Norvell Spearman [email protected] Sat Jan 18 17:34:41 2003.Code example. Messages sorted by: [ date ] [ thread ] [ subject ] [ author ].