icecream调试
icecream调试
from icecream import ic
def square_of(num):
return num*num
ic(square_of(2))
ic(square_of(3))
ic(square_of(4))#类似print,不过比print要多输出函数名称+结果
# 输出结果:
# ic| square_of(2): 4
# ic| square_of(3): 9
# ic| square_of(4): 16
ic.disable() #关闭之后所有的ice,
记录学习的点点滴滴