Ver Mensaje Individual
  #2 (permalink)  
Antiguo 20/07/2011, 15:16
Avatar de razpeitia
razpeitia
Moderador
 
Fecha de Ingreso: marzo-2005
Ubicación: Monterrey, México
Mensajes: 7.321
Antigüedad: 19 años, 2 meses
Puntos: 1360
Respuesta: funciones en Phyton

Simplemente crea las funciones que hagan eso:
Por ejemplo:
Código Python:
Ver original
  1. def print_people(people):
  2.     for person in people:
  3.         print "Name: %(Name)s, Height in meters: %(HeightMeters)s, Height in inches: %(HeightInches)0.2f" % person
  4.  
  5. ...#Some functions here
  6.  
  7. def main():
  8.     ...#Some code here
  9.     print_people(people)