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

This commit is contained in:
Максим Ардашев 2026-05-21 21:18:19 +03:00
parent c68e1ce592
commit 405cad4c26
5 changed files with 25 additions and 1 deletions

3
.gitignore vendored
View File

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

BIN
.script.py.swp Normal file

Binary file not shown.

6
data.txt Normal file
View File

@ -0,0 +1,6 @@
картофель
лук
чеснок
помидоры
капуста
огурцы

5
requirements.txt Normal file
View File

@ -0,0 +1,5 @@
numpy==2.4.6
pandas==3.0.3
python-dateutil==2.9.0.post0
six==1.17.0
tzdata==2026.2

12
script.py Normal file
View File

@ -0,0 +1,12 @@
with open("data.txt", "r", encoding="utf-8") as file:
lines = file.readlines()
upper_lines = []
for line in lines:
upper_lines.append(line.upper())
with open("output.txt", "w", encoding="utf-8") as file:
file.writelines(upper_lines)
print("Файл output.txt создан")