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