3 回答
TA贡献1860条经验 获得超9个赞
print()param1returnparam1
编辑:
returnreturn
TA贡献1820条经验 获得超3个赞
printprint()
print 1, '2', 'three'# 1 2 three
print (print()
def foo(): print 'hello' print 'again' print 'and again'
returnreturn()returnNonereturnreturn None
def foo(y):
print 'hello'
return y + 1
print 'this place in code will never get reached :('print foo(5)# hello# 6def bar():
return # implicit return Noneprint bar() is None# Truedef baz(y):
x = y * 2
# implicit return Nonez = baz()print z is None# Truereturnprint
添加回答
举报
