def drawDigit(i):
#画第1线段:
drawLine(True) if i in [2,3,4,5,6,8,9] else drawLine(False)
drawLine(True) if i in [0,1,3,4,5,6,7,8,9] else drawLine(False)
drawLine(True) if i in [0,2,3,5,6,8,9] else drawLine(False)
drawLine(True) if i in [0,2,6,8] else drawLine(False)
t.left(90) #改变画笔反向90度
drawLine(True) if i in [0,4,5,6,8,9] else drawLine(False)
drawLine(True) if i in [0,2,3,5,6,7,8,9] else drawLine(False)
drawLine(True) if i in [0,1,2,3,4,7,8,9] else drawLine(False)
t.left(180) #改变画笔方向180度
t.penup()
t.fd(20) #提笔数字间隔20px