file1 = open("SofthuntFile1.txt","w")
multiple_string = ["This is Mango
","This is Apple
","This is Banana
"]
is placed to indicate EOL (End of Line)
file1.write("Hello
")
file1.writelines(multiple_string)
file1.close()
file1 = open("SofthuntFile1.txt","r+")
print("Output of Read function is ")
print(file1.read())
print()
bite from the beginning.
file1.seek(0)
print( "Output of Readline function is ")
print(file1.readline())
print()
file1.seek(0)
print("Output of Read(9) function is ")
print(file1.read(9))
print()
file1.seek(0)
print("Output of Readline(9) function is ")
print(file1.readline(9))
file1.seek(0)
print("Output of Readlines function is ")
print(file1.readlines())
print()
file1.close()