Extract the middle N chars of a string
Steven D'Aprano
steve at pearwood.info
Wed May 18 20:48:16 EDT 2016
On Thu, 19 May 2016 07:35 am, Grant Edwards wrote:
> On 2016-05-18, Steven D'Aprano <steve at pearwood.info> wrote:
>
>> Getting the middle N seems like it ought to be easy:
>
> I'm still trying to figure out when one would want to do that...
I wanted to centre some text and truncate it to a fixed width. So I needed
the middle N characters.
--
Steven
More information about the Python-list
mailing list