Добавлены файлы data.txt, script.py
This commit is contained in:
1 parent
2bf892964e
commit
e3b9d90556
4 files changed
+13
No files matched your search
@@ -1 +1,2 @@
|
|||||||
.venv/
|
.venv/
|
||||||
|
output.txt
|
||||||
Binary file not shown.
@@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
with open('data.txt', 'r') as file:
|
||||||
|
lines = file.readlines()
|
||||||
|
transformed_lines = [line.strip().upper() for line in lines]
|
||||||
|
with open('output.txt', 'w') as file:
|
||||||
|
for line in transformed_lines:
|
||||||
|
file.write(line + '\n')
|
||||||
|
print("Данные успешно обработаны и сохранены в output.txt")
|
||||||
Reference in new issue
Block a user