%s其实就是 字符串的占位符%d是整数的占位符(也可以传float参数,但是会被floor掉)%f是float的占位符%r是原生字符串占位符输出:“hello,‘world’,this is Ashley!”对比用{!r}和{}的区别,发现前者输出的字符包含单引号,而后者则无。与{!r}类似的还有%r:print('hello,%r'%'world')...【阅读全文】
import turtle as tfrom turtle import *import random as rimport time#定义几个函数先#定义画彩灯的函数def drawlight(): if r.randint(0,30) == 0: color('tomato') ...【阅读全文】