New submission from Lovi <1668151...@qq.com>:
I think the list can add a parameter to remove():
remove(value, appear_time=1, /)
The parameter appear_time indicates the number of times the value appears in
the list.
I want this effect:
>>> list1 = [1, 2, 3, 2, 1, 2, 1]
>
Change by Lovi <1668151...@qq.com>:
--
nosy: +lovi
versions: -Python 3.7, Python 3.8
___
Python tracker
<https://bugs.python.org/issue39046>
___
___
Pyth
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) -> [(
New submission from Lovi <1668151...@qq.com>:
I think it's appropriate to add the generator fib() to the math module. With
fib(), some operations will be easier.
The generator is like this:
def fib(count=None):
if count is not None and not isinstance(count, int):
raise
Lovi <1668151...@qq.com> added the comment:
Sorry, I made a mistake.
The center char of '12345' is '3' and the center char of 'abcd' is '' because
it doesn't have the most central character.
In my opinion, with center_char, when you ne
New submission from Lovi <1668151...@qq.com>:
I think Python3.9 needs to add the center_char attribute which means the center
character of strings to string type, such as the center_char of '12345' is '1'
and the center_char of 'abcd' is 'bc'.
-