input() ignores newlines, truncates after 200 characters
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-25-2024 07:00 AM
Is there any setting to respect newlines and not truncate for input?
Also you can see the input text overflows over outside the box when the browser is narrow which is not desirable.
Labels:
- Labels:
-
DB Notebook
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-19-2026 12:45 PM
Workarounds
Option A — Print first, input separately (cleanest)
prompt = (
('o' * 200)
+ '\n'
+ ('?' * 200)
+ '\n'
+ ('-' * 200)
)
print(prompt)
x = input("> ")