【文件属性】:
文件名称:splitty:在python中使用可迭代对象的功能方法
文件大小:30.33MB
文件格式:ZIP
更新时间:2021-05-07 16:22:31
Python
分裂
在python中使用可迭代对象的功能方法
安装
pip install splitty
我如何使用零散?
你可以看
简单的例子
from splitty import *
>> > list_to_be_splited = [ 'spam' , 1 , 2 , 3 , 'eggs' , 1 , 2 , 3 , 'foo' , 1 , 2 , 3 ]
>> > split_by = [ 'spam' , 'eggs' , 'foo' ]
>> > splited = find_elements ( list_to_be_splited , split_by )
# [(0, 'spam'), (4, 'eggs'), (8, 'foo')]
>> > intervals = make_intervals ( splited )
# [slice(0, 4, None), slice
【文件预览】:
splitty-master
----.travis.yml(368B)
----pyproject.toml(487B)
----docs()
--------example.md(3KB)
--------index.md(1KB)
----mkdocs.yml(170B)
----tests()
--------test_splitty.py(7KB)
----tox.ini(965B)
----pylava.ini(167B)
----LICENSE(1KB)
----setup.cfg(40B)
----examples()
--------tjsp_parse()
--------book_parsed()
----setup.py(341B)
----.gitignore(394B)
----splitty()
--------splitty.pyi(949B)
--------__init__.py(401B)
--------splitty.py(5KB)
----README.md(1KB)