Добавлены файлы data.txt, script.py

This commit is contained in:
Надежда Емцова 2025-03-15 18:55:54 +03:00
parent 36aec4a559
commit 74f6767935
4 changed files with 12 additions and 1 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
.venv/
output.txt

View File

@ -1 +0,0 @@
.venv/

3
data.txt Normal file
View File

@ -0,0 +1,3 @@
Хлеб колбаса яйца
молоко печенье
помидоры огурцы майонез

7
script.py Normal file
View File

@ -0,0 +1,7 @@
with open('data.txt', 'r', encoding="utf-8") as infile:
data = infile.read()
modified_data = data.upper()
with open('output.txt', 'w', encoding="utf-8") as outfile:
outfile.writelines(modified_data)