资 源 简 介
I am playing fantasy football for the first time and I was asked to create a script that would take a list of team names and create randomly selected divisions.
Arguments should be text files with team names/info on unique lines.
Each file will be split into the specified number of divisions (or 2 divisions by default)
Duplicate lines are removed by default but can be preserved with the -d option.
Shoutz to: capsfan81
Usage: build-divisions.py [options] argsCreates a given number of randomized divisions from a list (text) file(s).Copyright (c) 2012 Joseph Zeranski Options: -h, --help show this help message and exit -d Do not remove duplicate teams/entries/lines. -n NUM_OF_DIVISIONS The number of divisions to split the list into. (Default: 2)
Examples:
./build-divisions.py teams.txt
./bu