def fun1():print('hello')
fun1() 结果为hello
print fun1()结果就变成None了
谁能帮忙解释下吗?谢谢
因为 fun1() 没有返回值或者说返回值None
print fun1()结果就变成None了这种写法不对哈,要想打印函数返回值,函数必须有返回值才行。def fun1():print('hello')这个函数没返回值,所以结果就变成None了