With the def statement : def « Statement « Python Tutorial






def hello(name): 
    return 'Hello, ' + name + '!' 

print hello('world')
print hello('Gumby')








3.6.def
3.6.1.With the def statement