diff --git a/.gitignore b/.gitignore index 0cafc1c..c136cf9 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.venv/ \ No newline at end of file +.venv/ +output.txt \ No newline at end of file diff --git a/data.txt b/data.txt new file mode 100644 index 0000000..da9dfd0 --- /dev/null +++ b/data.txt @@ -0,0 +1,5 @@ +one +two +three +four +five \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..0a9621a Binary files /dev/null and b/requirements.txt differ diff --git a/script.py b/script.py new file mode 100644 index 0000000..230ba23 --- /dev/null +++ b/script.py @@ -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") \ No newline at end of file