New submission from Lovi <1668151...@qq.com>:

I thought for a long time. I think it's necessary to add a segment method to 
str type or string module. This method is used to split a string into m parts 
and return all cases.

For example:

segment('1234', m=3) -> [('1', '2', '34'), ('1', '23', '4'), ('12', '3', '4')]
segment('12345', m=3) -> [('1', '2', '345'), ('1', '23', '45'), ('1', '234', 
'5'), ('12', '3', '45'), ('12', '34', '5'), ('123', '4', '5')]


I hope this proposal can be adopted.

----------
components: Library (Lib)
messages: 358383
nosy: lovi
priority: normal
severity: normal
status: open
title: Segmentation of string
type: enhancement
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39045>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to