I need to list the user-agent. I have to enter %prog --agents WITHOUT ARGUMENTS! But I still write that we need arguments. enter image description here

Here is the code itself.

Closed due to the fact that off-topic participants Aleksey Shimansky , αλεχολυτ , ߊߚߤߘ , Denis Bubnov , Sasha Omelchenko Apr 27 '17 at 14:51 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • “Questions asking for help with debugging (“ why does this code not work? ”) Should include the desired behavior, a specific problem or error, and a minimum code for playing it right in the question . Questions without an explicit description of the problem are useless for other visitors. See How to create minimal, self-sufficient and reproducible example . " - Alexey Shimansky, αλεχολυτ, Denis Bubnov, Sasha Omelchenko
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • one
    The question is not clear. Do not use images for code and output in the console. Edit your question and add the necessary information as text. Click Edit - jfs
  • Sorry, I solved this problem by adding action = 'store_true' - Danya Gololobov
  • one
    other people with a similar problem will find it harder to find if even argparse is not used in it. Related question: argparse module - jfs

1 answer 1

Problem solved. Method add action = 'store_true'.