Skip to content

Commit

Permalink
Style
Browse files Browse the repository at this point in the history
  • Loading branch information
Agusschajris committed Aug 14, 2024
1 parent 911b724 commit c831cc5
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 4 deletions.
9 changes: 9 additions & 0 deletions combine_lines.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
with open('w_names.txt', 'r') as file:
w_lines = file.readlines()

with open('m_names.txt', 'r') as file:
m_lines = file.readlines()

with open('m_names.txt', 'w') as file:
for m_line, w_line in zip(m_lines, w_lines):
file.write(m_line.strip() + " " + w_line)
9 changes: 7 additions & 2 deletions copy_content.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
with open('names.txt', 'r') as file:
content = file.read()
# PUNTO 2

with open('w_names.txt', 'r') as file:
content = file.read()

with open('empty.txt', 'w') as file:
file.write(content)
6 changes: 4 additions & 2 deletions count_lines.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
with open('names.txt', 'r') as file:
# PUNTO 1

with open('w_names.txt', 'r') as file:
lines = file.readlines()

print("Hay " + str(len(lines)) + " lineas en el archivos")
print("Hay " + str(len(lines)) + " lineas en el archivos")
10 changes: 10 additions & 0 deletions m_names.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Alvaro
Lautaro
Roman
Blur
Waterdy
Bauti
Benicio
Echu
Jano
Zeta
File renamed without changes.

0 comments on commit c831cc5

Please sign in to comment.