11 lines
346 B
Python
11 lines
346 B
Python
with open('data.txt', 'r', encoding='utf-8') as f:
|
|
lines = f.readlines()
|
|
|
|
processed_lines = [line.strip().upper() for line in lines]
|
|
|
|
with open('output.txt', 'w', encoding='utf-8') as f:
|
|
for line in processed_lines:
|
|
f.write(line + '\n')
|
|
|
|
print("Данные успешно обработаны и записаны в output.txt")
|