#单线程,"说"了再"写" from time import sleep,ctime #s说 def talk(): print('start talk:%r'%ctime()) sleep(2) #写 def write(): print('start write:%r'%ctime()) sleep(2) if __name__=="__main__": talk() write() print('all end ! %r'%ctime())