-
Notifications
You must be signed in to change notification settings - Fork 0
5A #8
Copy link
Copy link
Open
Description
input_file=open("input.txt","r")
lines=input_file.readlines()
input_file.close()
print("Initial Content:\n")
for line in lines:
print(line.strip())
clean_lines=[]
for line in lines:
text=line.strip()
if len(text)>0:
clean_lines.append(text)
clean_lines.sort()
print("\n Sorted Content:\n")
for item in clean_lines:
print(item)
output_file=open("output.txt","w")
for item in clean_lines:
output_file.write(item+"\n")
output_file.close()
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels