diff --git a/data.txt b/data.txt new file mode 100644 index 0000000..b4decef --- /dev/null +++ b/data.txt @@ -0,0 +1,5 @@ +Яблоки +Бананы +Молоко +Хлеб +Яйца \ No newline at end of file diff --git a/script.py b/script.py new file mode 100644 index 0000000..06cb33f --- /dev/null +++ b/script.py @@ -0,0 +1,12 @@ +# Открываем файл для чтения +with open('data.txt', 'r', encoding='utf-8') as file: + lines = file.readlines() # Читаем все строки + +# Преобразуем данные (переводим в верхний регистр) +processed_lines = [line.upper() for line in lines] + +# Записываем результат в новый файл +with open('output.txt', 'w', encoding='utf-8') as file: + file.writelines(processed_lines) + +print("Файл output.txt успешно создан!") \ No newline at end of file diff --git a/script/script.py b/script/script.py new file mode 100644 index 0000000..e69de29