Python Why Print File Get The Different Output When

Python Why Print File Get The Different Output When