pythontutor两种运行方式
1.Visualize Execution模式
* 编好以后,生成运行代码。
* 点击代码生成断点,代码变红。
* Edit the code。
2.Live Programming Mode模式
- 实时更新代码。
3.小技巧
#pythontutor_hide: arr
##这句话是在pythontutor里隐藏arr这个变量。
tmp = sum(arr)#break
##这句话是在设置断点
# Infinite Fibonacci!!!
arr = [1, 1]
print(arr[0])
#pythontutor_hide: arr
while True:
print(arr[-1])
tmp = sum(arr)#break
arr.append(tmp)
del arr[0]
4.数组
a=[1,2,3,4]
b=a
c=a[1]
d=a[-1]
pythontutor本地搭建服务
网址在上面。进入这个网站。