From e941f1957a677212acb1f9d727669f3007d53daa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=92=D0=B8=D0=BA=D1=82=D0=BE=D1=80=D0=B8=D1=8F=20=D0=AF?= =?UTF-8?q?=D0=BD=D0=B0=D0=BA=D1=82=D0=B0=D0=B5=D0=B2=D0=B0?= Date: Thu, 6 Mar 2025 19:20:59 +0000 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20=D0=B2=20=C2=AB?= =?UTF-8?q?/=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- requirements.txt | 6 ++++++ script.py | 20 ++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 requirements.txt create mode 100644 script.py diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..0308728 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +numpy==2.2.3 +pandas==2.2.3 +python-dateutil==2.9.0.post0 +pytz==2025.1 +six==1.17.0 +tzdata==2025.1 diff --git a/script.py b/script.py new file mode 100644 index 0000000..0e15299 --- /dev/null +++ b/script.py @@ -0,0 +1,20 @@ +def main(): + input_file = 'data.txt' + output_file = 'output.txt' + + try: + with open(input_file, 'r', encoding='utf-8') as file: + lines = file.readlines() + except FileNotFoundError: + print(f"Файл {input_file} не найден.") + return + + transformed_lines = [line.upper() for line in lines] + + with open(output_file, 'w', encoding='utf-8') as file: + file.writelines(transformed_lines) + + print(f"Преобразованные данные записаны в {output_file}.") + +if __name__ == "__main__": + main()