标签:print python name 入参 嵌套使用 特定 嵌套 方法 一个
#函数就是实现一个特定功能的程序块
#下面这个函数实现了打印helloworld的功能
def print_hello():
print(‘hello world!‘)
#这是调用方法
print_hello()
#下面的函数,实现了传入参数的功能
#在函数中可以嵌套使用其他函数
def print_name(name):
print_hello()
print(‘hello‘,name)
#带参数的调用方法
print_name(‘jack‘)
标签:print python name 入参 嵌套使用 特定 嵌套 方法 一个
原文地址:http://www.cnblogs.com/jackadam/p/7857311.html