On Python 3, print is thread safe.
But Python 2 has broken scenario:
print "spam", "spam", "spam" # thread 1
print "eggs", "eggs", "eggs" # thread 2
In this case, 2 lines are mixed.
In your case, "spam spam spam" and "eggs eggs eggs" are not mixed, but newline is mixed like:
spam spam spameggs eggs eggs
eggs eggs eggsspam spam spam