Last active
May 11, 2023 12:47
-
-
Save arynyklas/4ec2a659e1388e351e71c85e720bd48d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import List | |
def long_input(prompt: str) -> str: | |
result: List[str] = [] | |
print(prompt) | |
while True: | |
result_ = input() | |
if not result_: | |
break | |
result.append(result_) | |
return "\n".join(result) | |
# Usage: | |
long_input("Prompt:") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment