Q:

Multithreading doesn't work like I expect it to

I'm learning threading in Python 3. 
This is a simple concept example.   I want each thread to wait for 5 seconds before it prints, so the call to the thread is only 1 second large, it must return to the main thread. 
But the output for my code isn't what I expect. 
My code:
import threading, time

class MyThread(threading. Thread):  
    def __init__(self, num):
        threading. Thread.__init__(self)
        self.num = num

    def run(self): 
        time.sleep(5)
        print ("I'm thread number: ", self.num)

print ("I'm the principal thread.") 

for i in range(0, 10):
    t = MyThread(i)  
    t.start()      
    t.join(1)     
    print("I'm the principal thread, too.") 

The output: 
I'm the principal thread. 
I'm the principal thread, too. 
I'm the principal thread, too. 
I'm the principal thread, too. 
I'm the principal thread, too. 
I'm thread number:  0
I'm the principal thread, too. 
I'm thread number:  1
I'm the principal thread, too. 
I'm thread number:  2
I'm the principal thread, too. 
I'm thread number:  3
I'm the principal thread, too. 
I'm thread number:  4
I'm the principal thread, too. 
I'm thread number:  5
I'm the principal thread, too. 
I'm thread number:  6
I'm thread number:  7
I'm thread number:  8
I'm thread number:  9

The expected output is something like this:
I'm the principal thread. 
I'm the principal thread, too. 
I'm the principal thread, too. 
I'm the principal thread, too. 
I'm the principal thread, too. 
I'm thread number:  0
I'm the principal thread, too. 
I'm the principal thread, too. 
I'm the principal thread, too. 
I'm the principal thread, too. 
I'm thread number:  1
I'm the principal thread, too. 
I'm the principal thread, too. 
I'm the principal thread, too. 
I'm the principal thread, too. 
I'm thread number:  2
I'm the principal thread, too. 
... 

What am I doing wrong? 

A:

Based on your output, I think below logic must work

import threading, time

class MyThread(threading. Thread):  
    def __init__(self, num):
        threading. Thread.__init__(self)
        self.num = num

    def run(self): 
        time.sleep(5)
        print ("I'm thread number: ", self.num)

print ("I'm the principal thread.") 

for i in range(0, 10):
    t = MyThread(i)  
    t.start()      
    t.join(1)
    ## You join Times out here, since the thread didnt finish in 1 sec 
    ##(its sleeping for 5 secs)
    while t.isAlive():
        time.sleep(1)
        print("I'm the principal thread, too.")