Iterate over *args?

后端 未结 7 1426
借酒劲吻你
借酒劲吻你 2020-12-15 07:52

I have a script I\'m working on where I need to accept multiple arguments and then iterate over them to perform actions. I started down the path of defining a function and u

7条回答
  •  温柔的废话
    2020-12-15 07:57

    If your question is "how do I iterate over args", then the answer is "the same way you iterate over anything": for arg in args: print arg.

提交回复
热议问题