è¤æ°ã®ã¹ã¬ããã«ããå¦ç ä¸è¨ä¾ã§ã¯ã¡ã¤ã³ã¹ã¬ããã®ä»ã«ãµãã¹ã¬ãããçæããããããã®ã¹ã¬ããã§ç¾å¨æå»ã表示ãã¦ãã¾ããã¡ã¤ã³ã¹ã¬ããã§ã¯10ç§ããã«5åããµãã¹ã¬ããã§ã¯5ç§ããã«5åã®è¡¨ç¤ºã§ãã import threading import time import datetime class TestThread(threading.Thread): def run(self): print(' === start sub thread ===') for i in range(5): time.sleep(5) print(' sub thread : ' + str(datetime.datetime.today())) print(' === end sub thread ===') th = TestThread() th.start() time.sleep(1) p
{{#tags}}- {{label}}
{{/tags}}