From 911b72439195502c26e7e591f71add839740100b Mon Sep 17 00:00:00 2001 From: Aguss <111596201+Agusschajris@users.noreply.github.com> Date: Wed, 14 Aug 2024 09:21:30 -0300 Subject: [PATCH] Initial commit --- copy_content.py | 2 ++ count_lines.py | 4 ++++ empty.txt | 0 names.txt | 10 ++++++++++ 4 files changed, 16 insertions(+) create mode 100644 copy_content.py create mode 100644 count_lines.py create mode 100644 empty.txt create mode 100644 names.txt diff --git a/copy_content.py b/copy_content.py new file mode 100644 index 0000000..d7fad30 --- /dev/null +++ b/copy_content.py @@ -0,0 +1,2 @@ +with open('names.txt', 'r') as file: + content = file.read() \ No newline at end of file diff --git a/count_lines.py b/count_lines.py new file mode 100644 index 0000000..e7fe111 --- /dev/null +++ b/count_lines.py @@ -0,0 +1,4 @@ +with open('names.txt', 'r') as file: + lines = file.readlines() + +print("Hay " + str(len(lines)) + " lineas en el archivos") diff --git a/empty.txt b/empty.txt new file mode 100644 index 0000000..e69de29 diff --git a/names.txt b/names.txt new file mode 100644 index 0000000..9b87882 --- /dev/null +++ b/names.txt @@ -0,0 +1,10 @@ +Emma +Agus +Abril +Zoe +Juana +Clara +Magui +Eva +Paloma +Bren \ No newline at end of file