主页
Python
Python getopt 模块
demo_ref_module_getopt_basic
运行 ❯
×
更改方向
保存代码
更改主题
import getopt opts, args = getopt.getopt(["-a", "-b", "Linus"], "ab:") print(dict(sorted(opts))) print(args)
{'-a': '', '-b': 'Linus'}
[]