diff --git a/app/main.py b/app/main.py index 1b70596b..fb473f52 100644 --- a/app/main.py +++ b/app/main.py @@ -1,6 +1,18 @@ -def main(): - # write your code here - pass +def main() -> None: + file_name = input("Enter name of the file: ") + + content: list[str] = [] + + while True: + line = input("Enter new line of content: ") + + if line == "stop": + break + + content. append(line) + + with open(f"{file_name}.txt", "w") as file: + file.write("\n".join(content)) if __name__ == "__main__":