how to parse sys.argv as dynamic parameters to another function?

Ian Kelly ian.g.kelly at gmail.com
Fri Jan 30 11:28:42 EST 2015


On Fri, Jan 30, 2015 at 9:09 AM, Robert Chen <robertchen117 at gmail.com> wrote:
> how to parse sys.argv as dynamic parameters to another function?
>
>
> fun(sys.argv)
>
> in perl, this is very easy. please help.

Do you mean that you want each item of sys.argv to be passed as a
separate parameter to the function? If so, then:

fun(*sys.argv)



More information about the Python-list mailing list