Добавлены файлы data.txt, script.py
This commit is contained in:
+2
-1
@@ -1 +1,2 @@
|
||||
.venv/
|
||||
.venv/
|
||||
output.txt
|
||||
Binary file not shown.
@@ -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
|
||||
@@ -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 создан")
|
||||
Reference in New Issue
Block a user