Explore
Connect
Documentation
Snippets
Log in
Sign up
1
2
3
4
5
6
7
8
9
10
11
12
# Example 1 - single-threaded logic
def
do_work():
print(
'Hello, world!'
)
do_work()
# Example 2 - multi-threaded logic
from
threading
import
Thread
for
t
in
(Thread(target=do_work)
for
_
in
range(
10
)):
t.start()
Enter to Rename, Shift+Enter to Preview
Run