编辑器
import getopt opts, args = getopt.getopt(["-a", "-b", "Linus"], "ab:") print(dict(sorted(opts))) print(args)
{'-a': '', '-b': 'Linus'}
[]