Question about split method

Erik python at lucidity.plus.com
Sat Dec 5 17:20:03 EST 2015


On 05/12/15 20:27, Mark Lawrence wrote:
> On 05/12/2015 19:51, Robert wrote:
>> On Saturday, December 5, 2015 at 2:29:28 PM UTC-5, Peter Pearson wrote:
>>> On Wed, 2 Dec 2015 14:44:30 -0600, Ian Kelly <ian.g.kelly at gmail.com>
>>> wrote:
>>>> On Wed, Dec 2, 2015 at 2:37 PM, Robert <rxjwg98 at gmail.com> wrote:
>>> [snip]
>>>>> ss0="1, 2, 4, 8, 16".split(", ")
>>> [snip]
>>>> Try help(str.split)
>>>
>>> Or if, like me, you can't remember the magic word "str", ask:
>>>
>>> help("".split)
>>>
>>> and you know you're asking about the right "split".
>>>
>>> --
>>> To email me, substitute nowhere->runbox, invalid->com.
>>
>> Thanks for your smart method.
>>
>
> The even smarter method is:
>
> help(''.split)
>
> as this saves you reaching for the shift key :)

... except you're already pressing it for the open parenthesis ... ;)

E.



More information about the Python-list mailing list