Добавлены файлы data.txt, script.py

This commit is contained in:
Дмитрий Корзюков 2025-03-06 20:55:25 +03:00
parent 4ed802a1dc
commit 2ba302629e
4 changed files with 16 additions and 1 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
.venv/
output.txt

5
data.txt Normal file
View File

@ -0,0 +1,5 @@
one
two
three
four
five

BIN
requirements.txt Normal file

Binary file not shown.

9
script.py Normal file
View File

@ -0,0 +1,9 @@
with open('data.txt', 'r') as input_file:
data = input_file.readlines()
uppercase_data = [line.upper() for line in data]
with open('output.txt', 'w') as output_file:
output_file.writelines(uppercase_data)
print("Данные успешно записаны в файл output.txt")