Question about split method

Mark Lawrence breamoreboy at yahoo.co.uk
Sat Dec 5 15:27:00 EST 2015


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 :)

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence




More information about the Python-list mailing list