Добавлены файлы data.txt, script.py
This commit is contained in:
parent
bb0c6ee2bd
commit
0029646ffc
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +1,2 @@
|
||||
.venv/
|
||||
output.txt
|
11
script.py
Normal file
11
script.py
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
with open('data.txt', 'r', encoding='utf-8') as file:
|
||||
lines = file.readlines()
|
||||
|
||||
transformed_lines = [line.upper() for line in lines]
|
||||
|
||||
with open('output.txt', 'w', encoding='utf-8') as file:
|
||||
for line in transformed_lines:
|
||||
file.write(str(line) + '\n')
|
||||
|
||||
print("Файл output.txt успешно создан!")
|
Loading…
Reference in New Issue
Block a user