10 lines
366 B
Python
10 lines
366 B
Python
with open('data.txt', 'r', encoding='utf-8') as input_file:
|
|
lines = input_file.readlines()
|
|
|
|
upper_case_lines = [line.upper() for line in lines]
|
|
|
|
with open('output.txt', 'w', encoding='utf-8') as output_file:
|
|
output_file.writelines(upper_case_lines)
|
|
|
|
print("Данные успешно преобразованы и записаны в output.txt.")
|