Name
apply
Synopsis
apply(func
,args
=( ),keywords
={ })
Calls a function (or other callable object) and returns its result.
apply
’s behavior is exactly the
same as
func
(*
args
,**
keywords
)
.
The *
and **
forms are covered
in Section 4.10 in Chapter 4. In almost all cases of practical interest,
you can just use the syntax
func
(*
args
,**
keywords
)
and avoid apply
.
Get Python in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.