Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions app/main.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
def main():
def main() -> None:
# write your code here
pass
file_name = input("Enter name of the file: ")
file_lines = []
while True:
file_line = input("Enter new line of content: ")
if file_line == "stop":
break
file_lines.append(file_line)
with open(f"{file_name}.txt", "w") as file:
for line in file_lines:
file.write(f"{line}\n")


if __name__ == "__main__":
Expand Down
3 changes: 3 additions & 0 deletions hello_world
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Python is great!
FastApi is becoming popular
What will be with Django in the future?
Empty file added i_am_empty
Empty file.
2 changes: 2 additions & 0 deletions name1
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This is the first line of content
This is the second
Loading