It depends on the definition
\do will expand to
In the core latex format it has two unrelated uses.
It is used in "executable lists" in a style derived from plain TeX and described in the TeXBook.
verbatim internally uses a list defined via
\dospecials list had been defined as
you would need some loop macro to iterate over the list but by having a command separator, all you need to do is define
\do locally and then execute the list so `verbatim does
\@makeother is applied to each of the tokens.
The other use is as a delimited argument. If you had needed a looping macro you could have used the form
for the form with no commas, or
for the form with commas.
\do are not actually defined to do anything they are just tokens used to delimit the arguments of
\@for which is defined via
so the list variable (
#1) is everything up to
:= and the list (
#2) is (after expansion0 everything between
\do, with the list body (
#3) being the next token or brace group after