比如输入forward 2表示前进2米,在代码设计上如何体现这里(通过提取字符串和数字)
例如:
import turtle as ta = 2t.forward(a)print(f'走了{a}米')
有点麻烦 但是好用