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