python parser.add_argument() action

1:parser.add_argument('--xxxx', action='store_true', help='.....') 
2:parser.add_argument('--xxxx', action='store_true',default =ture, help='.....')
3:parser.add_argument('--xxxx', action='store_true',default =ture, help='.....')

When there is defalt, the value of xxxx is consistent with default, true or false

When there is no default, the value of xxxx is, action = store_ture, then xxxx=false, action = store_false, xxxx=true

Guess you like

Origin blog.csdn.net/Theflowerofac/article/details/101015278