Python用法参数语法的含义(例如:Usage-example.py[-h]--example{example~~})

Python用法参数语法的含义(例如:Usage-example.py[-h]--example{example~~}),python,Python,你好,我想知道[]的意思,{},-- 例如,当我执行python程序时,程序打印“用法:example.py[-h]example--example{example}” 在这方面,[]、{}、-??对于Python的具体含义是什么:-a(arg短名称)、-arg\u名称(arg长名称),[option1,option2]其他可选的arg,{choice1,choice2}设置要传递到arg中的选项/选项列表(通常是字符串)。最佳资源:。

你好,我想知道[]的意思,{},--

例如,当我执行python程序时,程序打印“用法:example.py[-h]example--example{example}”


在这方面,[]、{}、-??

对于Python的具体含义是什么:
-a
(arg短名称)、
-arg\u名称
(arg长名称),
[option1,option2]
其他可选的arg,
{choice1,choice2}
设置要传递到arg中的选项/选项列表(通常是字符串)。最佳资源:。