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