Добавлены файлы data.txt, script.py
This commit is contained in:
@@ -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