How to iterate over arguments February 1, 2023 by Tarik Add vars if you want to iterate over a Namespace object: for arg in vars(args): print arg, getattr(args, arg)