Re: pase de parametros

fabio rojas <[email protected]>
Newsgroups gmane.comp.python.general.castellano
Message-ID <[email protected]>
pues digamos que tenemos:

def funcion(*parametros):

    for n in parametros:
        print n



>>>funcion("hola")
        hola

>>>funcion("Hola","Mundo",77)
        Hola
        Mundo
        77

como ves cuando uso * paso una lista de parametros, y si llego a invocar la
funcion sin argumentos pues pasa una lista vacio y no imprimiria nada.
_______________________________________________
Lista de correo Python-es 
http://listas.aditel.org/listinfo/python-es
FAQ: http://listas.aditel.org/faqpyes
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.