To create the first file, we can use the following code:
```python
file1 = open("file1.txt", "w")
file1.write("Line 1\n")
file1.write("Line 2\n")
file1.write("Line 3\n")
file1.close()
```
Similarly, we can create the second file using the following
Show more…