by Devin Yang
(This article was automatically translated.)

Published - 4 years ago ( Updated - 4 years ago )

Record, how to use thread to perform functions
 
from threading import Thread
def test(*args):
    #parameter one
    text = list(args)[0]
    print(text)

# Execute function with Thread
thread = Thread(target=test, args=["testabc"])
thread.start()

Tags: python

Devin Yang

Feel free to ask me, if you don't get it.:)

No Comment

Post your comment

Login is required to leave comments

Similar Stories


python

Macos executes Python and appears certificate verify processing

When I execute python, I get an error note

python

The python version of the tirm command

Record how to use python's tirm command

linux, python, colab

How to connect to colab from our Server through ssh?

Introduce a bash I wrote to connect to colab vm through ssh. One line of instructions, get colab OpenSSH Server.