On Mon, 27 Jan 2014 10:23:49 -0600, Zachary Ware wrote:
>> Understood, except that some parameters take multiple elements...thus
>> why I manually reference the indexes.
>
> Try this on for size, then:
>
> a_iter = iter(a)
> for arg in a_iter:
> print('current', arg)
> if arg == '-#':
> print('next', next(a_iter))
And check out add_argument's "nargs" option:
http://docs.python.org/3/library/argparse.html#nargs
HTH,
Dan
--
https://mail.python.org/mailman/listinfo/python-list
