- Code: Select all
# Open a file
fo = open("test.txt", "wb")
fo.write( "Python is a great language. \nYeah its great!!!\n");
# Close opened file
This is the code I tried to create a text file. When I open the test.txt, the statement "Yeah its great!!!" is not in a new line, why is it so?
any wrong with my code? Thanks for your guides!