Posted By

louscomp on 12/17/09


Tagged

python console function define interactive call


Versions (?)

Define and call a function in interactive mode


 / Published in: Python
 

hola() function to avoid having to write print "hola mundo" and only write hola () to display hola mundo whenever we wish.

  1. #Define a function
  2. >>> def hola():
  3. print "hola mundo"
  4.  
  5. #Call the function
  6. >>> hola()
  7. hola mundo

Report this snippet  

You need to login to post a comment.