I've been following a Tkinter Python tutorial on its frame widget.
(Under the subsection Assigning Widgets to Frames With Frame Widgets. Search by that phrase to get there easily.)
frame_a=tk.Frame()    
frame_b=tk.Frame()
label_a=tk.Label(text="I am frame A")   
label_a.master=frame_a    
label_a.pack()   
label_b=tk.Label(text="I am frame B")  
label_b.master=frame_b
label_b.pack()
frame_a.pack()  
frame_b.pack()  
When I ran this code it successfully gave  output.
 output.
Consider the last two lines; the tutorial suggested to change their order, and put frame_b.pack() before frame_a.pack() and that will make the phrase 'I am frame B' will come on top, as frame_b is packed first.
However, I get the same output as before. What is am I doing wrong here? (The code runs without errors.)

masterattribute like you're doing does absolutely nothing.