Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/performance/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 我想把参数传递给一个不可更改的函数,它是';的参数是否存储在列表中?_Python_List_Function_Arguments - Fatal编程技术网

Python 我想把参数传递给一个不可更改的函数,它是';的参数是否存储在列表中?

Python 我想把参数传递给一个不可更改的函数,它是';的参数是否存储在列表中?,python,list,function,arguments,Python,List,Function,Arguments,假设,示例是一个python内置函数,无法修改 Args=[12,22,16,62,25] def example(arg1, arg2, arg3, arg4, args3): return arg1+arg2 但是不能将paas list元素作为参数:(您可以将参数列表作为例如: example(arg for arg in Args) 您可以通过以下方式传递参数列表: example(arg for arg in Args)

假设,示例是一个python内置函数,无法修改

Args=[12,22,16,62,25]

def example(arg1, arg2, arg3, arg4, args3): return arg1+arg2

但是不能将paas list元素作为参数:(

您可以将参数列表作为例如:

example(arg for arg in Args)

您可以通过以下方式传递参数列表:

example(arg for arg in Args)