I have a list...

user at domain.invalid user at domain.invalid
Tue Jul 1 03:57:25 EDT 2003


Damir Hakimov wrote:
> Hi, All!
> 
> say, i have a function:
> 
> def f(*b):
>   print b
>   return
> 
> then i do:
> f(3,4,5)
> (3, 4, 5)
> 
> but i have list f=(3,4,5)
> f(l)
> ((3, 4, 5),)    
> 
> how can i call f function to result
> f(???(b))
> (3, 4, 5)
> 
> Thanks!
> 
> 
> 
You can use the keyword 'type' to check the type of your arguments
and return the appropriate 'format' according to the their types

Regards

Salvatore






More information about the Python-list mailing list