列出文件中行的排列。

mixemup的Python项目详细描述


混音

Build Status

串合并器

这个程序接受一个字符串文件作为输入,并生成这些字符串的组合列表作为输出。

安装

需要Python3.7或更高版本。

pip install mixemup

用法

Usage: mixemup.py [OPTIONS] FILE_PATH

  This program takes in a file with strings, and produces delimiter-
  separated combinations of these strings.

Options:
  -d, --delimiter TEXT     Set the delimiter.
  -r, --prefix TEXT        Add the given string to the beginning of each line.
  -o, --postfix TEXT       Add the given string to the end of each line.
  -n, --min-parts INTEGER  Set the minimum number of parts in output. This
                           count does not include prefixes and postfixes.
  -m, --max-parts INTEGER  Set the maximum number of parts in output. This
                           count does not include prefixes and postfixes.
  --version                Show the version and exit.
  --help                   Show this message and exit.

示例

$ cat names.txt
bob
alice
john
jack
sally
$ mixemup names.txt

bob
alice
john
jack
sally
bob alice
bob john
bob jack
bob sally
alice john
alice jack
alice sally
john jack
john sally
jack sally
bob alice john
bob alice jack
bob alice sally
bob john jack
bob john sally
bob jack sally
alice john jack
alice john sally
alice jack sally
john jack sally
bob alice john jack
bob alice john sally
bob alice jack sally
bob john jack sally
alice john jack sally
bob alice john jack sally

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
sql server使用Java读取SQLCMD的输出文件   使用Jackson在没有堆栈跟踪的情况下序列化/反序列化异常   在Java中比较字符串。等于()   数组在Java中显示图像   Java,在对象列表中搜索?   java您需要使用JDK运行build或使用其他工具。类路径上的jar   JavaApacheHTML响应返回乱码   java SQLFunctionTemplate不应用查询参数的顺序   用于跟踪请求工作流的java Guice请求范围   java手柄意图照相机   java Eclipse插件和线程   java列出已运行的jUnit测试   java如何获取与outlook中显示完全相同的pdf格式副本   java从portlet向远程web应用发出HTTP GET请求   如果枚举中的类型只使用一次,我应该创建一个枚举还是一个类   java如何将JSON传递给所需的Web服务   java文件到字节[]的读取不正确   如何解决线程“main”java中的异常。lang.arithmetricexception:/by零?   java在Android活动之间传递字符串