Python incluye ejercicios 34
Título: Práctica llamada a la función.
Análisis del programa: Ninguno.
Código fuente:
#!/usr/bin/python # -*- coding: UTF-8 -*- def hello_world(): print 'hello world' def three_hellos(): for i in range(3): hello_world() if __name__ == '__main__': three_hellos()
La salida del ejemplo anterior es:
hello world hello world hello world