Discuss / Python / 有一点小问题

有一点小问题

Topic source

JOIEUH

#1 Created at ... [Delete] [Delete and Lock User]

def now(): print('abc')

f = now() #运行会出现abc

f = abs(-10) #运行却没有出现结果

这是为什么?,按道理来说f = now()不应该出现结果,因为这个不是相当于赋值吗,结果不会显示出来才对?

廖雪峰

#2 Created at ... [Delete] [Delete and Lock User]

注意区分 f = now() 和 f = now


  • 1

Reply