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