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