Python Program to Read a File Line By Line and Copied to Another File

file1=open("AI.txt", "w")
file1.write("Artificial Intelligence is a method of learning new data.\nArtificial intelligence is the future of this world and we will see all computers who can think themselves.")
file1=open("AI.txt", "r")
file2=open("C.txt", "w")
for line in file1:
    file2.write(str() + "" + line)
file2=open("C.txt", "r")
print(file2.read())

Python Program to Read a File Line By Line and Copied to Another File