Update builder.py
Browse files- builder.py +3 -3
builder.py
CHANGED
|
@@ -8,15 +8,15 @@ file2_name = "train_1.txt"
|
|
| 8 |
output_file_name = "train.txt"
|
| 9 |
|
| 10 |
# Open the first input file in read mode
|
| 11 |
-
with open(file1_name, 'r') as file1:
|
| 12 |
file1_content = file1.read()
|
| 13 |
|
| 14 |
# Open the second input file in read mode
|
| 15 |
-
with open(file2_name, 'r') as file2:
|
| 16 |
file2_content = file2.read()
|
| 17 |
|
| 18 |
# Open the output file in write mode and combine the contents
|
| 19 |
-
with open(output_file_name, 'w') as output_file:
|
| 20 |
output_file.write(file1_content)
|
| 21 |
output_file.write("\n") # Add a newline between the contents of the two files
|
| 22 |
output_file.write(file2_content)
|
|
|
|
| 8 |
output_file_name = "train.txt"
|
| 9 |
|
| 10 |
# Open the first input file in read mode
|
| 11 |
+
with open(file1_name, 'r', errors='ignore') as file1:
|
| 12 |
file1_content = file1.read()
|
| 13 |
|
| 14 |
# Open the second input file in read mode
|
| 15 |
+
with open(file2_name, 'r', errors='ignore') as file2:
|
| 16 |
file2_content = file2.read()
|
| 17 |
|
| 18 |
# Open the output file in write mode and combine the contents
|
| 19 |
+
with open(output_file_name, 'w', errors='ignore') as output_file:
|
| 20 |
output_file.write(file1_content)
|
| 21 |
output_file.write("\n") # Add a newline between the contents of the two files
|
| 22 |
output_file.write(file2_content)
|