← 返回 oracle 的题目列表Multithreading Functionality
类型:online_judge
oracle
Please implement a simple multithreading program, in which multiple threads are started, and each thread prints its thread ID. Ensure that threads execute correctly and complete in order.
Example
Assuming 5 threads are started, the output might be:
Thread 1: 1
Thread 2: 2
Thread 3: 3
Thread 4: 4
Thread 5: 5
Requirements
Implement using Python.
The number of threads is 5.
Each thread needs to print its thread ID (from 1 to 5).