Добавлены файлы data.txt, script.py
This commit is contained in:
parent
8b05545c42
commit
9501ee882d
1
.gitignore
vendored
1
.gitignore
vendored
@ -0,0 +1 @@
|
||||
.venv/
|
2
output.txt
Normal file
2
output.txt
Normal file
@ -0,0 +1,2 @@
|
||||
ВОДА 3
|
||||
ЛИМОНАД 2
|
6
requirements.txt
Normal file
6
requirements.txt
Normal file
@ -0,0 +1,6 @@
|
||||
numpy==2.2.4
|
||||
pandas==2.2.3
|
||||
python-dateutil==2.9.0.post0
|
||||
pytz==2025.1
|
||||
six==1.17.0
|
||||
tzdata==2025.1
|
9
script.py
Normal file
9
script.py
Normal file
@ -0,0 +1,9 @@
|
||||
with open('data.txt', 'r', encoding='utf-8') as file:
|
||||
lines = file.readlines()
|
||||
|
||||
upper_lines = [line.upper() for line in lines]
|
||||
|
||||
with open('output.txt', 'w', encoding='utf-8') as file:
|
||||
file.writelines(upper_lines)
|
||||
|
||||
print("Файл output.txt успешно создан.")
|
Loading…
Reference in New Issue
Block a user