import threading
from time import sleep

def one(num):
    a = 1
    sleep(num)
    #current_thread()当前线程变量
    print("....%s.....num=%s...."%(threading.current_thread(),a))

if __name__ == '__main__':
    t = threading.Thread(target=one,args=(5,))
    t1 = threading.Thread(target=one,args=(2,))
    t.start()
    t1.start()

5d7e923ef36eae1a9d3246201b1d665a31ec0d01
<mask token>

<mask token>


def one(num):
    a = 1
    sleep(num)
    print('....%s.....num=%s....' % (threading.current_thread(), a))


<mask token>

<mask token>


def one(num):
    a = 1
    sleep(num)
    print('....%s.....num=%s....' % (threading.current_thread(), a))


if __name__ == '__main__':
    t = threading.Thread(target=one, args=(5,))
    t1 = threading.Thread(target=one, args=(2,))
    t.start()
    t1.start()

import threading
from time import sleep


def one(num):
    a = 1
    sleep(num)
    print('....%s.....num=%s....' % (threading.current_thread(), a))


if __name__ == '__main__':
    t = threading.Thread(target=one, args=(5,))
    t1 = threading.Thread(target=one, args=(2,))
    t.start()
    t1.start()

import threading
from time import sleep

def one(num):
    a = 1
    sleep(num)
    #current_thread()当前线程变量
    print("....%s.....num=%s...."%(threading.current_thread(),a))

if __name__ == '__main__':
    t = threading.Thread(target=one,args=(5,))
    t1 = threading.Thread(target=one,args=(2,))
    t.start()
    t1.start()
