Home
Sign Up
Sign In
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member
Sign In
V2EX
›
问与答
在 Python3 中怎么给函数中的函数传递参数?
Malvo
·
Jan 7, 2020
· 1857 views
This topic created in 2301 days ago, the information mentioned may be changed or developed.
例如:
def fun1(): fun2(a,b,c,...)
想给 fun2 传递参数,但是参数个数不确定,该怎么实现呢?
fun2
函数
参数
Python3
3 replies
•
2020-01-07 11:39:23 +08:00
1
di94sh
Jan 7, 2020
def fun1(*args, **kwargs):
fun2(*args, **kwargs)
2
lvhuiyang
Jan 7, 2020
https://docs.python.org/3/tutorial/controlflow.html#arbitrary-argument-lists
https://docs.python.org/3/tutorial/controlflow.html#keyword-arguments
3
Malvo
OP
Jan 7, 2020
@
di94sh
@
lvhuiyang
谢谢🙏
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Solana
·
5390 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 36ms ·
UTC 01:23
·
PVG 09:23
·
LAX 18:23
·
JFK 21:23
♥ Do have faith in what you're doing.
❯