Добавлены файлы data.txt, script.py
This commit is contained in:
parent
c68e1ce592
commit
405cad4c26
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
.venv/
|
||||
output.txt
|
||||
BIN
.script.py.swp
Normal file
BIN
.script.py.swp
Normal file
Binary file not shown.
5
requirements.txt
Normal file
5
requirements.txt
Normal 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
12
script.py
Normal 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 создан")
|
||||
Loading…
Reference in New Issue
Block a user